Express middleware for handling Joi validations with typescript support.
Middleware that helps with the property validation, if the test passes, next function in the row will be invoked, otherwise, the server responds with 422 status and JSON object with a list of errors.
API
const app = ;const bodyValidation = ;// also available: { paramsValidation, queryValidation } const schema = Joiobject username: Joi ; app;
ES6 imports
;;// also available: { paramsValidation, queryValidation } const app = ; const schema = Joiobject username: Joi ; app;