express-validator is a set of express.js middlewares that wraps validator.js validator and sanitizer functions. It's recommended that you have basic knowledge of the express.js module before you go on with this guide. Sometimes, receiving input in a HTTP request isn't only about making sure that the data is in the right format, but also that it is free of noise. validator.js provides a handful of sanitizers that can be used to take care of the data that comes in. Although express-validator offers plenty of handy validators and sanitizers through its underlying dependency validator.js, it doesn't always suffice when building your application. For these cases, you may consider writing a custom validator or a custom sanitizer. A custom validator may be implemented by using the chain method .custom(). It takes a validator function.

Features

  • Custom validators/sanitizers
  • Custom Error Messages
  • Schema Validation
  • Whole Body Validation
  • Running validations imperatively
  • Validation middlewares

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow express-validator

express-validator Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of express-validator!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Frameworks, TypeScript Web Development Software

Registered

2022-10-31