diff --git a/express-validator/express-validator-tests.ts b/express-validator/express-validator-tests.ts index d6ae4addb..74bd277e4 100644 --- a/express-validator/express-validator-tests.ts +++ b/express-validator/express-validator-tests.ts @@ -9,7 +9,7 @@ var app = express(); app.use(expressValidator()); -app.post('/:urlparam', function(req: expressValidator.ValidatedRequest, res: express.Response) { +app.post('/:urlparam', function(req: express.Request, res: express.Response) { // checkBody only checks req.body; none of the other req parameters // Similarly checkParams only checks in req.params (URL params) and @@ -17,17 +17,17 @@ app.post('/:urlparam', function(req: expressValidator.ValidatedRequest, res: exp req.checkBody('postparam', 'Invalid postparam').notEmpty().isInt(); req.checkParams('urlparam', 'Invalid urlparam').isAlpha(); req.checkQuery('getparam', 'Invalid getparam').isInt(); - req.checkHeader('testHeader', 'Invalid testHeader').isLowercase().isUppercase(); - req.checkFiles('testFiles', 'Invalid testFiles').isUrl(); + req.checkHeader('testHeader', 'Invalid testHeader').isLowercase().isUppercase(); + req.checkFiles('testFiles', 'Invalid testFiles').isUrl(); - // OR assert can be used to check on all 3 types of params. + // OR assert can be used to check on all 3 types of params. // req.assert('postparam', 'Invalid postparam').notEmpty().isInt(); // req.assert('urlparam', 'Invalid urlparam').isAlpha(); // req.assert('getparam', 'Invalid getparam').isInt(); req.sanitize('postparam').toBoolean(); - req.filter('postparam').toBoolean(); + req.filter('postparam').toBoolean(); var errors = req.validationErrors(); var mappedErrors = req.validationErrors(true);