Re: Chained validators again
Ian Bicking <[email protected]> Fri, 6 Mar 2009 10:51:29 -0600
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Mar 6, 2009 at 9:59 AM, Andrea Riciputi <[email protected]> wrote: > Hi, > I'm still having some issues with chained validators. Despite what > mentioned in the documentation, chained_validators **doesn't** always > allow for multiple validators to fail. For the validators to keep getting called, each validator has to have a method validate_partial, which raises Invalid if there's an exception, but whose return value is ignored, and the validator has to have an attribute vaildate_partial_form which is True. There's just a check in Schema that tests if that's the case for each chained validator (once there's an error), and skips the validators that don't have that. -- Ian Bicking | http://blog.ianbicking.org ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H