i'm using express-validator to validate the user value . not error show in the console but when try in postman its show error in below image
auth.js
const db_connection = require('./dataConn.js')
const {body,param,validationResult} = require("express-validator")
module.exports = {
userInfo : [
body("name", "The name must be of minimum 3 characters length")
.optional()
.isLength({min:3})
.trim()
.unescape()
.escape(),
body("email","Invalid email address")
.optional()
.trim()
.unescape()
.escape()
.isEmail()
.custom(async (value) => {
const [row] = await db_connection.execute(
"SELECT `email` FROM `users` WHERE `email` =?",
[value]
);
if(row.length > 0){
return Promise.reject("E-mail already in use");
}
}),
],