express-validator object keys code example
Example: 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
},
);