validating #20

chovy opened this Issue Oct 3, 2012 · 2 comments


None yet
2 participants

chovy commented Oct 3, 2012

If is possible to validate req.params.whatever fields?

These are special tokens, like:

app.get('/:username', routes.username);

The username would be req.params.username => 'chovy'


ctavan commented Oct 4, 2012

This should work out of the box.

req.assert('username', 'Invalid username').isAlpha();

Can you confirm that?


ctavan commented Jun 6, 2013

Closing since there was no reply and since this should definitely work.

ctavan closed this Jun 6, 2013

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