I am trying to use the express-validator with express 3.0 and it gives an error when I call:
expressValidator = require("express-validator")
app.use(expressValidator)
req.assert(req.body.password,'Enter Password').notEmpty()
errors = req.validationErrors()
I get the error:
500: TypeError: Object # has no method ‘validationErrors’
How to use the express-validator?
Thanks.
Be sure you install express-validator using:
You should do something like this: