Input validation on server side

Working on a node/mongodb project. I need an expert opinion about validating entries into database like a pw must have at least 1 special char or 1 digit . I’m already using jquery validator(jqueryvalidation.org) for front end form validation, now should I need again another at the back end also? I’ve already sanitized the user input…thanks!

If you’re using Mongoose as ORM it has number of simpler validation methods. If that’s not enough then there are literally thousands of validation libraries for Node. In short, validation on the client is the domain of UX (making user feel better), validation on server is the domain of security - you definitely need validation on the server

1 Like

Could u plz describe a bit what u mean by ‘Mongoose simpler validation method’???.. Yes, mongoose is being used.

It’s described pretty well here:
https://mongoosejs.com/docs/validation.html

1 Like

ohh. got it. thank you very much!