Skip to content

v2.2.0

Compare
Choose a tag to compare
@sergioalvz sergioalvz released this 07 Mar 19:43
· 10 commits to trunk since this release

✨ 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();
  },
});