Validation Error: schema[parameter].validateAsync is not a function

I’m trying to create an API in express. When I call the same, I’m getting the above error.
I went through the GitHub links below which contain solutions to similar problems but none of them have worked for me. Below is my code which I hope is useful,



Schema: (trip.validator.js)

const Joi = require('joi');

getAllFiltered: {
    query: Joi.object({
      offset: Joi.string(),
      limit: Joi.string(),
      from: Joi.string(),
      to: Joi.string(),
      technicians: Joi.array().items(Joi.string()),
      status: Joi.string(),
      enterprise_id: Joi.string(),
      payment_status: Joi.string().valid('pending', 'invoiced', 'paid')

Route: (trips.route.js)

let router = require('express').Router();
const { validate } = require('express-validation');
const tripValidation = require('../validators/trip.validator');
const tripController = require('../controllers/trip.controller');
const AuthMiddleware = require('../middlewares/auth.middleware')

  (req, res) => {
    tripController.getAllFiltered(req, res)


Kindly help.

141 thoughts on “Validation Error: schema[parameter].validateAsync is not a function”

  1. I just could not go away your web site prior to suggesting that I actually enjoyed the standard info an individual provide for your guests? Is gonna be again incessantly in order to inspect new posts.

  2. I’m amazed, I have to admit. Rarely do I encounter a blog that’s
    both equally educative and interesting, and let me tell you, you have hit the nail on the head.
    The issue is something which too few folks are speaking intelligently
    about. I’m very happy I found this during my hunt for something relating to

  3. I think that is one of the most significant information for me.
    And i’m happy studying your article. However should commentary on some general things, The website taste is perfect,
    the articles is actually excellent : D. Good activity, cheers

  4. Hello, Neat post. There’s a problem along with your web site
    in web explorer, may test this? IE nonetheless is the market chief and a big
    element of other people will pass over your magnificent writing
    because of this problem.

  5. With havin so much content do you ever run into any problems of plagorism or copyright violation? My website has a lot of unique content I’ve
    either written myself or outsourced but it looks like a lot of it is popping it up all over
    the web without my agreement. Do you know any methods
    to help stop content from being ripped off? I’d truly appreciate it.

  6. Very great post. I just stumbled upon your blog and wished to say that I’ve truly enjoyed browsing
    your weblog posts. After all I’ll be subscribing to your feed and I hope you
    write once more soon!

  7. Hi exceptional blog! Does running a blog such as this require a
    lot of work? I have very little expertise in coding but I
    was hoping to start my own blog soon. Anyway, should
    you have any recommendations or techniques for new blog owners please share.

    I know this is off subject however I just wanted to ask.
    Thank you! quest bars quest bars

  8. Wow, fantastic weblog structure! How long have you ever been blogging for? you made running a blog glance easy. The overall look of your web site is fantastic, let alone the content!

  9. Hello there! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a extraordinary job!

  10. Pingback: nolvadex 25mg
  11. Pingback: tizanidine caps
  12. Pingback: baricitinib
  13. Pingback: chlomid