-
-
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
Getting "undefined" error when running validations imperatively with "oneOf" #995
Comments
Does it work correctly if you don't run it imperatively? edit: express-validator/src/middlewares/one-of.ts Lines 63 to 69 in 7ba714b
|
Awesome, thanks! Edit: Parallel processing worked fine, so I will switch to that for the time being. |
We actually have to figure out what result we want to expose. Furthermore some of those properties are marked as |
Hey there! This is fixed on v6.11.0 🚀 |
Describe the bug
I am running a simple validation using oneOf and running the validations imperatively. My validation middleware calls validation.run(validation), the result is undefined.
To Reproduce
The validation middleware taken from the docs
Sample route that is failing
Payload
Expected behavior
I expect the imperative validation would work as is, given that function comes from the documentation. And it seems like this issue was similar, but was resolved with a PR.
Current behavior
Express-validator version:
Am I doing something wrong here?
The text was updated successfully, but these errors were encountered: