Skip to content
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

I want to set a rule that the user cant send a field other than the fields that I set to send to the server. #746

Closed
behzadnm99 opened this issue Jul 22, 2019 · 3 comments

Comments

@behzadnm99
Copy link

I want to set a rule that the user cant send a field other than the fields that I set to send to the server. i want that user send only send this fields : {name: String, city: String}. no OTHER fields.

please help me to do this with express-validator

@gustavohenke
Copy link
Member

This has been asked before: #266, and it is not something supported by express-validator yet.

Since then I haven't spent much time thinking about this. I welcome any ideas.

@gustavohenke
Copy link
Member

Also, if you use matchedData(), you can pretty much solve the problem of getting more than you expect.

@gustavohenke
Copy link
Member

Duplicate of #809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants