Show full validation error

This commit is contained in:
Maidul Islam
2023-01-01 13:13:03 -05:00
parent 776b4c2922
commit f2bd4aec39
+1 -1
View File
@@ -15,7 +15,7 @@ const validate = (req: Request, res: Response, next: NextFunction) => {
try { try {
const errors = validationResult(req); const errors = validationResult(req);
if (!errors.isEmpty()) { if (!errors.isEmpty()) {
return next(ValidationError({ context: { errors: `One or more of your paramters are invalid [error=${errors.array}]` } })) return next(ValidationError({ context: { errors: `One or more of your parameters are invalid [error(s)=${(JSON.stringify(errors))}]` } }))
} }
return next(); return next();