Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

React Hook Form Resolvers

Validation resolvers for React Hook Form supporting Zod, Yup, and others.

Forms, validation and schemasNPM

GitHubWebsite

1. License

License from npm.

github.com/react-hook-form/resolvers

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What React Hook Form Resolvers does

It is a set of adapters, not a validator: one package with a separate entry point per library (<code>@hookform/resolvers/zod</code>, <code>/yup</code>, <code>/joi</code> and so on) that plugs the 20 resolvers in its README comparison table into React Hook Form's <code>resolver</code> option.

React Hook Form Resolvers popularity

74 / 100
Gid Score, #252 overall
54.9M
downloads a week, npm
2,264
GitHub stars
499
agent projects use it
React Hook Form Resolvers: downloads per weeknpm, @hookform/resolvers 54,896,165
React Hook Form Resolvers: GitHub starsreact-hook-form/resolvers 2,264

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How React Hook Form Resolvers is used

  • React Hook Form Resolvers is a dependency in 499 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (10.3% of the 4,867 JavaScript/TypeScript ones), #4 of 63 in forms, validation and schemas.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,990; those are left out of every share on this page.
  • The most used alternative in our scan is Valibot (33 projects).
  • Projects that use it most often also use React Hook Form (99.2%), Zod (98.6%), clsx (92.4%).
  • It is more common in projects set up for Roo Code (14.4%) than for OpenCode (4.7%).

By coding agent

269 projects, 11.0%
235 projects, 7.2%
213 projects, 7.0%
34 projects, 12.2%
28 projects, 5.9%
27 projects, 5.8%
16 projects, 4.7%
16 projects, 14.4%

Often used with

In 99.2% of its projects
In 98.6% of its projects
In 92.4% of its projects
In 91.8% of its projects
In 91.6% of its projects
In 87.2% of its projects
In 78.0% of its projects
In 99.6% of its projects

React Hook Form Resolvers in practice

Strengths

Keep the schema library you already have

You add this package beside your existing validation library. Each library has its own import path, such as <code>@hookform/resolvers/zod</code> or <code>@hookform/resolvers/yup</code>.

Form types come from the schema

With a resolver that supports inference, <code>useForm</code> needs no generic. The README's Zod example passes only <code>zodResolver(schema)</code>, and the output type is inferred.

Same call shape for every adapter

Each resolver takes the schema, optional library-specific schema options, and resolver options. The resolver options choose <code>sync</code> or <code>async</code> mode. The README says <code>async</code> is the default.

All errors per field with many resolvers

The README's comparison table has a <code>criteriaMode</code> column. It marks <code>firstError | all</code> for Zod, Yup, Valibot, Effect, Standard Schema, class-validator, TypeBox, VineJS, AJV, joi, vest and others.

Watch out for

Inference and error modes vary by library

The README's table marks AJV, ata-validator, fluentvalidation-ts, joi, Nope, typeschema and vest as not inferring values from the schema. It marks Arktype, computed-types, fluentvalidation-ts, io-ts, Nope, Superstruct and typanion as <code>firstError</code> only. Check the table before you pick a library.

Zod <code>.default()</code> and a single generic conflict

A Zod field with <code>.default(...)</code> is optional on the input type but required on the output type. Writing <code>useForm&lt;T&gt;</code> with one type then conflicts with <code>zodResolver</code>. The README says to omit the generic or pass all three.

Yup context belongs on useForm

Context passed through <code>yupResolver</code>'s <code>schemaOptions</code> is overridden by the form context. The README says to put it in <code>useForm({ context })</code> instead.

Zod schema wired into useForm

import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod'; // or 'zod/v4'

const schema = z.object({
  name: z.string().min(1, { message: 'Required' }),
  age: z.number().min(10),
});

const App = () => {
  const {
    register,
    handleSubmit,
    formState: { errors },
  } = useForm({
    resolver: zodResolver(schema),
  });

  return (
    <form onSubmit={handleSubmit((d) => console.log(d))}>
      <input {...register('name')} />
      {errors.name?.message && <p>{errors.name?.message}</p>}
      <input type="number" {...register('age', { valueAsNumber: true })} />
      {errors.age?.message && <p>{errors.age?.message}</p>}
      <input type="submit" />
    </form>
  );
};

More about React Hook Form Resolvers

Funding
  • GitHub Sponsors: https://github.com/bluebill1049
  • GitHub Sponsors: https://github.com/jorisre
  • Patreon: https://patreon.com/bluebill1049
  • Open Collective: https://opencollective.com/react-hook-form
  • 7 GitHub sponsors

See all

Packages around it
  • @hookform/error-message: Form error message component
  • @hookform/devtools: Form devtools
  • react-hook-form: Form state hook
  • zod: Schema validation
  • clsx: Class name builder
  • lucide-react: Icons
More in Forms, validation and schemas

Alternatives

React Hook Form Resolvers This page

MITGid 7454.9M/wk

Valibot

Modular and type-safe schema validation library for structural data with minimal bundle size.

MITGid 6836M/wk

Yup

Simple schema validation library for JavaScript with chainable API and error handling.

MITGid 6916.6M/wk

Formik

Popular React form state management library with validation and submission handling.

Apache-2.0Gid 666.4M/wk

Compare React Hook Form Resolvers with another tool

Get started

Install it.

npm install @hookform/resolvers

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## React Hook Form Resolvers
- Install `@hookform/resolvers` alongside the validation library, and import the resolver from its subpath, e.g. `import { zodResolver } from '@hookform/resolvers/zod'`.
- Pass the resolver as `useForm({ resolver: zodResolver(schema) })`. Omitting the generic lets the form types be inferred from the resolver.
- If a Zod schema uses `.default(...)` on a field, do not pass a single generic `useForm<T>`. Either omit the generic or pass all three: `useForm<z.input<typeof schema>, unknown, z.output<typeof schema>>`.
- For Yup, pass context via `useForm({ context })`, not via `yupResolver`'s `schemaOptions.context`, which is overridden.
- `register('age', { valueAsNumber: true })` requires react-hook-form v6.12.0 or later.
- Only set `criteriaMode: 'all'` with resolvers the README table lists as supporting `all`. The default is `firstError`.
- With class-validator, set `"strictPropertyInitialization": false` and `"experimentalDecorators": true` in `tsconfig.json`. With Ajv, use `minLength: 1` to implement a required field.