This repository was archived by the owner on Jun 16, 2026. It is now read-only.
Repository navigation
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();
},
});