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
Implicit exists() or not? #399
Comments
This seems to be a bug, actually. See the relevant lines in Since validator only accepts strings, values passed to the standard validators get converted to string. This behaviour must be changed (perhaps use the same as v3), and possibly include a comprehensive integration test suite, testing each validator function 🛠 👨🏭 |
Ah! So the reason Thus for |
Yes, but please don't take this for granted. It's a bug. |
Fix published in v4.1.1. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am in the process of migrating my express-validator 3.2.1 app to the new v4 API (4.1.0). In order to make my question easier, I already setup a test app.
I am using Node.js 8.4.0 with npm 5.3.0 BTW.
Please run the following:
Test using
curl
:The following is the result:
What I expected:
Question is, why does
query('email').isEmail().withMessage('must be valid')
gets an implicitexists()
whilequery('name').isAscii().withMessage('must be ASCII')
doesn't?The text was updated successfully, but these errors were encountered: