diff --git a/src/middlewares/validate.js b/src/middlewares/validate.js index 573365cc..14079543 100644 --- a/src/middlewares/validate.js +++ b/src/middlewares/validate.js @@ -7,7 +7,7 @@ const validate = (schema) => (req, res, next) => { const validSchema = pick(schema, ['params', 'query', 'body']); const object = pick(req, Object.keys(validSchema)); const { value, error } = Joi.compile(validSchema) - .prefs({ errors: { label: 'key' } }) + .prefs({ errors: { label: 'key' }, abortEarly: false }) .validate(object); if (error) {