I was just wondering where I should sanitize and validate my incoming data. Mongoose has some validation functions and combined with Validate.js I can do the validation there. But should I also do the sanitization there? Or is it better to do this with the express-validator middleware straight from the request. And should I also do the validation at this point? Or even both?
Or is there another better practice?
I hope you can advise me!
Cheers,
Mik