v2.0.0
Breaking Changes
This version includes breaking changes. The default export is now a factory function that can be configured to have custom error handling for validation errors. The README.md
has been updated accordingly to reflect the new behavior.
import withJoi from "next-joi";
export default withJoi({
onValidationError: (_, res) => {
return res.status(400).end();
},
});