-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation with multiple fields #281
Comments
Hey @ramalhoruben I think it's not currently possible. @alecthomas: What are your views on supporting these kind of constraints? Thanks. |
I think we should support a way of validating the parent object. |
@alecthomas is it possible to pass to validator function entire data object as a second argument? |
Will partial function application work?
Might get a bit cumbersome/verbose for more complicated use cases but it helps keep voluptuous simple. |
One solution is given in #124. |
Is it possible to validate a field using information from a second field? For example to check if the object doesn't violate a compound key constraint? Here's an example of what I pretend to do:
The text was updated successfully, but these errors were encountered: