Answers for "express validator check object"

1

express validator check object

const express = require('express');
const { check } = require('express-validator');

const app = express();
app.use(express.json());

app.post(
  '/addresses',
  check('addresses.*.postalCode').isPostalCode(),
  check('addresses.*.number').toInt(),
  (req, res) => {
    // Handle the request
  },
);
Posted by: Guest on March-23-2021

Code answers related to "express validator check object"

Code answers related to "Javascript"

Browse Popular Code Answers by Language