question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

express validator is not a function

See original GitHub issue

I used express-validator for some of my projects, today when i installed it and i wanted to use it like this const expressValidator = require('express-validator'); app.use(expressValidator); i got the error “expressValidator is not a function” this is with version “6.1.1” i installed version “5.3.1” i used before and it worked.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:24
  • Comments:28 (3 by maintainers)

github_iconTop GitHub Comments

65reactions
miriafassarellacommented, Sep 16, 2019

With me it worked out that way:

Uninstall the current version: npm uninstall express-validator And install the older version: npm install express-validator@5.3.1

47reactions
rexsteroxycommented, Aug 9, 2019

You can change or degrade the version by running this command in your root folder. npm install express-validatior@5.3.1–save-exact

No need to delete your node modules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Express Validator Error: expressValidator is not a function
Express Validator has been updated therefore, you can't use it this way This is a new way to use the express validator.
Read more >
Express Validator Error: expressValidator is not a function
Learn here about how to fix the Express Validator Error: expressValidator is not a function. Resolve TypeError: expressValidator is ...
Read more >
How to use Express Validator | Getting Started with Express ...
Express -validator is an express middleware that provides us with validation and sanitization functions. Actually, Express validator is built on top of ...
Read more >
How to make input validation simple and clean in ... - Medium
express -validator is a set of express.js middlewares that wraps validator.js validator and sanitizer functions. The module implements five important API's:.
Read more >
validationResult() - express-validator
Extracts the validation errors from a request and makes them available in a Result object. Each error returned by .array() and .mapped() methods...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found