Back to Explore

react-hook-form/resolvers

GitHub
16 updates · last 90 days1 watchersOpen source

Last release:

Provides validation “resolvers” for React Hook Form, letting you plug in external validation libraries like Yup, Zod, Joi, Ajv, and others. Useful if you want to validate form input using the schema library you already prefer, optionally with TypeScript type inference from the schema.

Project status

  • Actively maintained: The repository has frequent recent updates, with the latest upstream push on 2026-07-26, and multiple version updates on 2026-07-25 to 2026-07-26 (well within days of today, 2026-07-30).
  • Update cadence: Several patch updates shipped within about 1 day (v5.5.1 to v5.5.7 all dated 2026-07-25/26), suggesting an active maintenance cycle rather than long quiet periods.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v5.7.1

    v5.7.1 is a patch release focused on updating the ata-validator peer dependency to a newer major/minor version. The diff shows only manifest and lockfile changes, with no application/source-code logic changes.

  • v5.7.0

    Release v5.7.0 adds support for Vine v4. The code changes primarily update tests and documentation to use Vine v4 schema construction APIs, and the dependency graph is updated accordingly.

    Features
  • v5.6.0

    v5.6.0 updates multiple resolver implementations to stop silently dropping validation errors when a form field name matches JavaScript Object prototype properties. The release notes describe the behavioral fix at a high level, and the code diff shows the same underlying implementation change applied across many libraries.

  • v5.5.8

    v5.5.8 fixes a Zod resolver issue where validation errors could be dropped when the validated field name matches inherited Object.prototype properties. The change ensures the internal error map does not treat keys like "toString" or "constructor" as already-present due to prototype inheritance.

  • v5.5.7

    Release v5.5.7 is a targeted fix for npm install failures caused by an ERESOLVE peer dependency conflict involving @hookform/resolvers and valibot versions. The only code changes are updates to valibot version constraints in package manifests.

  • v5.5.6

    v5.5.6 primarily addresses a runtime/module-resolution issue when importing `zodResolver` with Zod v3. The underlying fix is implemented by changing how `zod/v3` and `zod/v4/core` are imported and by updating the internal logic that recognizes Zod v4 errors.

  • v5.5.5

    v5.5.5 contains a targeted bug fix for how validation errors expose the `ref` for checkbox fields when using the Yup resolver. The actual code change adjusts `toNestErrors` to pull the real DOM element from react-hook-form’s `refs` array for radio/checkbox fields, and adds regression tests.

  • v5.5.4

    v5.5.4 updates the AJV resolver to avoid mutating the input values object during validation when using AJV features like defaults. The change is implemented by cloning the values before calling AJV validate, and then returning the cloned (parsed) result. A test was added to ensure the input object is not mutated, and the README received an additional ZodResolver type note.

  • v5.5.3

    v5.5.3 fixes conditional or dynamically selected Zod schemas not resolving correctly in zodResolver. The code changes also adjust how resolver detects Zod v3 versus v4 schemas and how it invokes Zod parse methods to avoid module-instance mismatches.

  • v5.5.2

    v5.5.2 fixes a Zod v4 integration issue where `zodResolver` was not honoring Zod v4 locale and global error customization. The change adjusts how the resolver performs Zod v4 parsing so it uses the schema instance itself rather than a standalone `zod/v4/core` parse function.

  • v5.5.1

    v5.5.1 includes a fix related to zod v4 handling of nested discriminated unions inside the zodResolver. The code change adds defensive logic to avoid throwing when Zod produces a union issue shape that does not contain the expected nested errors array. A new test was added to cover the previously failing scenario.

  • v5.5.0

    v5.5.0 is primarily a tooling update, moving the project to TypeScript 6 and upgrading various development and test dependencies. The release notes are minimal and do not mention any library source-level typing refactors or build configuration changes beyond that high-level upgrade.

    Features
  • v5.4.3

    v5.4.3 includes a Zod resolver bug fix specifically around how union validation errors are selected and surfaced. The code diff also contains a notable change in the typeschema error parsing logic, plus TypeScript typing adjustments for superstructResolver. Release notes only mention the Zod union error fix.

  • v5.4.2

    v5.4.2 is a bugfix release focused on improving error handling for standard-schema resolvers and fixing TypeScript type incompatibilities for zodResolver and yupResolver. The code changes largely appear to be targeted at root error preservation and branded Zod type compatibility.

  • v5.4.1

    v5.4.1 primarily updates package metadata to declare the various supported validation libraries (used by resolver adapters) as optional peerDependencies. This ensures package managers can correctly detect and install peer deps for each adapter, instead of relying on hoisting luck.

  • v5.4.0

    v5.4.0 introduces a new `ata-validator` resolver (`ataResolver`) with accompanying React Hook Form integration tests, including native validation behavior. The release also includes a fix to `toNestErrors.ts`, and a documentation note about passing context to `yupResolver`.

    Features
  • v5.2.2

    Release v5.2.2 contains a Zod-related bug fix focused on the Zod 4 resolver. The release notes only mention an output type correction for the Zod 4 resolver.

    Breaking
  • v5.2.1

    Release v5.2.1 updates the Zod v4 support in @hookform/resolvers, specifically around discriminated unions and correct resolver output typing for Zod 4. It also adjusts the package peer dependency range to allow Zod v4.

  • v5.2.0

    v5.2.0 adds AJV format support to the `ajvResolver` by installing `ajv-formats` and registering it on the AJV instance. It also updates repo lint tooling, switching the `lint` script from `bunx @biomejs/biome ...` to `biome ...`.

    Features
  • v5.1.1

    Release v5.1.1 includes a small change related to the Zod integration. The published release notes describe it as a peer dependency fix for Zod, but do not specify the exact peer dependency adjustment.