-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add support for conditional/dependent validation #8
Labels
Comments
raderio
changed the title
Add support for conditional validation
Add support for conditional/dependent validation
Apr 12, 2019
Good idea. I would be open for a pull request for this. I am not quite sure yet how the DSL should look like. One possibility I could think of would look like this Person::email {
inOrder {
pattern("\\[email protected]") hint "Organizers must have a BigCorp email address"
uniqueInDatabase(dao) hint "Email has been taken"
}
} |
@nlochschmidt I wonder if default behaviour should be changed to seqential (eg. fail fast) and |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example I want to validate an email field, I want to validate it against a regexp pattern, and only it is a valid email I want to check if it is already taken(persisted in database).
The text was updated successfully, but these errors were encountered: