middleware/validate/store/update/information/name
unknown
plain_text
a year ago
419 B
4
Indexable
const { body, validationResult } = require('express-validator') const updateStoreNameValidator = [ // Validate name body("name") .isString() .withMessage("name must be a string"), (req, res, next) => { const errors = validationResult(req) if (!errors.isEmpty()) { return res.status(400).json({ errors: errors.array() }) } next() } ] module.exports = updateStoreNameValidator
Editor is loading...
Leave a Comment