1.1.1 • Published 4 years ago
@jpruliere/express-validator v1.1.1
Express validator for Joi
Generates Express middlewares that validate Joi schemas against request data
A ready to use package exporting 2 functions :
validateBody(schema)
takes a Joi schema and returns a MW that validates the request payload against itvalidateQuery(schema)
takes a Joi schema and returns a MW that validates the query string against it
Changelog
1.1.1
- Rewrote the README to make the excerpt more explicit
1.1.0
- Replaced request data with the normalized version returned by the
validate
method of a Joi schema - Declared Joi 14+ (chosen quite randomly) as dependency : though the package does not actually requires Joi, it obviously depends on its mechanics
1.0.2
- Translated JSDoc in english
1.0.1
- Added a README.md
1.0.0
- Initial release