-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
Usage of bail() in validation schema #848
Comments
Like this:
However, there is no way to use multiple |
This seems to work (e.g, error stops after |
@ngocketit Yea, I actually use typescript in this project. What about making it a field inside the validation type, like this:
I can try to implement this feature if you don't mind |
@hamboomger That's very nice & it'd be awesome if it can be implemented. |
I already have implemented it. |
@tommmn cool, thanks for mentioning it here! Should I close this issue or you will close it by PR? |
@hamboomger I've open PR. should wait for a merge if there are no problems. |
Oh you actually referenced this issue in your PR, sorry, didn't notice |
Published in v6.9.0! |
Hello there!
Is there a way to get similar behaviour to what bait() method does using Schema Validation? The desired behaviour is to stop validation chain after a specific validation failed (
exists
in my case)The text was updated successfully, but these errors were encountered: