Re: decorating validators, CompoundValidator

Ian Bicking <[email protected]> Tue, 20 May 2008 15:53:01 -0400
Newsgroups gmane.comp.python.formencode
Message-ID <[email protected]>
W-Mark Kubacki wrote:
>> W-Mark Kubacki wrote:
>>> Can we introduce a Consecutive/Stepper/Decorating validator or reanimate
>>> the CompoundValidator, so the developer can combine decorators? [...]
> 
>> From: Ian Bicking [mailto:[email protected]]
>>
>> I'd like one, I just can't think of the name.  Unfortunately, and not
>> quite intentionally, All ended up being in this kind of reversed-order,
>> and fixing it would cause problematic compatibility problems elsewhere.
>>  Maybe And()?
> 
> Pipe() seems intuitive from the point of view of a BASH user. Chain() sounds 
> similar to chained_validators, which might be misleading. Sequence(), 
> Consecution()?
> The very first is my favorite.
> 
> The validator should be rather trivial to write. If nobody volunteers I can 
> implement it.

Yeah... I think Pipe sounds right.  I assume this is purely All, but 
with the constructor taking the items in a more sensible order?

-- 
Ian Bicking : [email protected] : http://blog.ianbicking.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/