Pylons/colander — Issue #30: Support multiple validators, but stop at first exception
Author: aatiis
Created: 2011-12-14 03:59:16+00:00
State: open

It would be handy if there would be something like `All` that would stop at the first validation error.

Some validations are quick & easy, like `Email`, but some can be pretty expensive, like checking if the email address is already in use. There's no need for that check, if the email is not valid in the first place.

I'm happy to attach a pull request, if somebody would be smart enough to suggest a name.

An alternative would be to support a list or tuple of validators as the `validator` argument to `SchemaNode` and stop at the first failure by default.

Or maybe I'm just missing the obvious way to do this, in which case the docs should be updated (which I'm happy to do once somebody explains me how to do what I want).