-
Notifications
You must be signed in to change notification settings - Fork 934
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
oneOf, notOneOf swallowing multiple errors #552
Comments
seems like a bug |
Cool |
@jquense It seems like this "bug" was done intentionally, by reading the code and here. It's not immediately clear to me why a subset of validations need/should be run first? But in any case, if a typeError, blacklist, or whitelist error are encountered, then no other validations are run, regardless of |
@akmjenkins Whitelisted and blacklisted values are checked first, this is the same as Joi. When these values are met, validation is stopped without further testing. Edit Sorry my bad. |
why is this closed? here's my use case:
when the field is left blank, the validation says "You cannot use your email address as password." instead of "Required" |
i also got this issue |
@jquense this is still a bug, I suspected it got closed due to inactivity. I just opened a PR as the (dis)allowed value tests being run first are not documented behavior in the README or the test suite. Seems like a pretty straightforward change! |
|
Same issue
Setting abortEarly to false has no effect |
The following gives me a ValidatorError with three errors:
The following gives me a ValidationError with only one error:
Seems counterintuitive.
The text was updated successfully, but these errors were encountered: