Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

567
Vistas
(intermediate value) is not iterable show error in postman

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

error occur while using post method in postman

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");
      }
    }),
  ],

  

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda