Re: Chained validators again
Andrea Riciputi <[email protected]> Mon, 9 Mar 2009 10:46:43 +0100
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
Thanks Ian, I was able to make it work as inteded. However I was wondering if it was better to make those kind of chained validators to inherit from FormValidator instead that from FancyValidator. Which is the real purpose of FormValidators? The documentation is quite terse. Cheers, Andrea On 6 Mar, 2009, at 17:51, Ian Bicking wrote: > 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. ------------------------------------------------------------------------------ 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