React Hook Form Schema Resolvers
Compare every official schema resolver by package, type inference, and criteria mode.
The @hookform/resolvers package connects external validation libraries to useForm. A resolver receives the complete form values, validates them against a schema, and returns normalized values and errors.
Installation
Install React Hook Form, the resolver package, and your chosen schema library:
npm install react-hook-form @hookform/resolvers <validation-library>
Every adapter follows the same integration pattern:
import { useForm } from "react-hook-form"import { libraryResolver } from "@hookform/resolvers/library"const form = useForm({resolver: libraryResolver(schema),})
Resolver comparison
“Infers values” means the resolver can infer the submitted output from its schema. criteriaMode describes whether the adapter can return only the first error or all errors for a field.
| Schema library | Resolver | Install | Infers values | criteriaMode |
|---|---|---|---|---|
| AJV | ajvResolver from @hookform/resolvers/ajv | ajv | No | firstError | all |
| ata-validator | ataResolver from @hookform/resolvers/ata-validator | ata-validator | No | firstError | all |
| ArkType | arktypeResolver from @hookform/resolvers/arktype | arktype | Yes | firstError |
| Class Validator | classValidatorResolver from @hookform/resolvers/class-validator | class-validator | Yes | firstError | all |
| computed-types | computedTypesResolver from @hookform/resolvers/computed-types | computed-types | Yes | firstError |
| Effect | effectTsResolver from @hookform/resolvers/effect-ts | effect | Yes | firstError | all |
| fluentvalidation-ts | fluentValidationResolver from @hookform/resolvers/fluentvalidation-ts | fluentvalidation-ts | No | firstError |
| io-ts | ioTsResolver from @hookform/resolvers/io-ts | io-ts | Yes | firstError |
| Joi | joiResolver from @hookform/resolvers/joi | joi | No | firstError | all |
| Nope | nopeResolver from @hookform/resolvers/nope | nope-validator | No | firstError |
| Standard Schema | standardSchemaResolver from @hookform/resolvers/standard-schema | A compatible schema library | Yes | firstError | all |
| Superstruct | superstructResolver from @hookform/resolvers/superstruct | superstruct | Yes | firstError |
| typanion | typanionResolver from @hookform/resolvers/typanion | typanion | Yes | firstError |
| TypeBox | typeboxResolver from @hookform/resolvers/typebox | @sinclair/typebox | Yes | firstError | all |
| TypeSchema | typeschemaResolver from @hookform/resolvers/typeschema | @typeschema/main and a schema library | No | firstError | all |
| Valibot | valibotResolver from @hookform/resolvers/valibot | valibot | Yes | firstError | all |
| Vest | vestResolver from @hookform/resolvers/vest | vest | No | firstError | all |
| VineJS | vineResolver from @hookform/resolvers/vine | @vinejs/vine | Yes | firstError | all |
| Yup | yupResolver from @hookform/resolvers/yup | yup | Yes | firstError | all |
| Zod | zodResolver from @hookform/resolvers/zod | zod | Yes | firstError | all |
Resolver options
Resolvers accept an optional third argument:
resolver(schema, schemaOptions, {mode: "async", // or "sync"raw: false,})
- Async mode is the default. Use
synconly when the schema performs no asynchronous work. - Set
raw: truewhen submitted values should remain unparsed instead of using the schema's transformed output. - Pass a form value type to
useFormwhen the comparison table says inference is unavailable.
For detailed working examples, see the dedicated Zod guide and Yup guide. The official resolvers repository maintains quick starts for every adapter.