Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

buildCheckFunction(locations)

const { buildCheckFunction } = require('express-validator');
const checkBodyAndQuery = buildCheckFunction(['body', 'query']);

app.put(
  '/update-product',
  // id must be either in req.body or req.query, and must be an UUID
  checkBodyAndQuery('id').isUUID(),
  productUpdateHandler,
);
Source by express-validator.github.io #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+5 =