v2.2.0
✨ New
The onValidationError
function will now receive the validation error coming from Joi as a third parameter!
import withJoi from "next-joi";
export default withJoi({
onValidationError: (req, res, error) => {
return res.status(400).end();
},
});