You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I type "app.use(expressValidator());" in my app.js, then I type "node app.js" it give me some error:
req.assert("name", 'xxxx0-9,a-z,A-Z').isAlphanumeric();
^
TypeError: Cannot call method 'assert' of undefined
The text was updated successfully, but these errors were encountered:
You need to make sure you're using req.assert() inside a route's callback. req is probably undefined because you're trying to use that line outside of the context of a route. See "Usage" in the README for more details.
Hi, I type "app.use(expressValidator());" in my app.js, then I type "node app.js" it give me some error:
req.assert("name", 'xxxx0-9,a-z,A-Z').isAlphanumeric();
^
TypeError: Cannot call method 'assert' of undefined
The text was updated successfully, but these errors were encountered: