Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

565
Views
(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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!