Skip to content

v2.0.0

Compare
Choose a tag to compare
@sergioalvz sergioalvz released this 20 Nov 11:00
· 26 commits to trunk since this release

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