bboe/pyramid_addons — pull request #2 by kyledewey (2012-12-04 22:17:25+00:00)
Title: Added the And, Or, Equals, Fail, and OneOfEnum validators.

Descriptions of each kind of new validator:
- And: allows for the composition of an arbitrary number of validators over a given parameter with respect to conjunction. Also threads values through the given validators, allowing for chaining. In other words, if any composed validator fails, the whole And validator fails.
- Or: allows for the composition of an arbitrary number of validators over a given parameter with respect to disjunction. In other words, if any passes, the whole Or validator will pass.
- Equals: Checks for equality between the value passed by run() and some internal value (according to Python's ==). Failure occurs if they are not equal.
- Fail: A validator that always fails with a given message.
- OneOfEnum A validator that will ensure that a given value (passed to run()) is contained within a set of given values (passed to the OneOfEnum constructor).