Skip to content

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 libraryResolverInstallInfers valuescriteriaMode
AJVajvResolver from @hookform/resolvers/ajvajvNofirstError | all
ata-validatorataResolver from @hookform/resolvers/ata-validatorata-validatorNofirstError | all
ArkTypearktypeResolver from @hookform/resolvers/arktypearktypeYesfirstError
Class ValidatorclassValidatorResolver from @hookform/resolvers/class-validatorclass-validatorYesfirstError | all
computed-typescomputedTypesResolver from @hookform/resolvers/computed-typescomputed-typesYesfirstError
EffecteffectTsResolver from @hookform/resolvers/effect-tseffectYesfirstError | all
fluentvalidation-tsfluentValidationResolver from @hookform/resolvers/fluentvalidation-tsfluentvalidation-tsNofirstError
io-tsioTsResolver from @hookform/resolvers/io-tsio-tsYesfirstError
JoijoiResolver from @hookform/resolvers/joijoiNofirstError | all
NopenopeResolver from @hookform/resolvers/nopenope-validatorNofirstError
Standard SchemastandardSchemaResolver from @hookform/resolvers/standard-schemaA compatible schema libraryYesfirstError | all
SuperstructsuperstructResolver from @hookform/resolvers/superstructsuperstructYesfirstError
typaniontypanionResolver from @hookform/resolvers/typaniontypanionYesfirstError
TypeBoxtypeboxResolver from @hookform/resolvers/typebox@sinclair/typeboxYesfirstError | all
TypeSchematypeschemaResolver from @hookform/resolvers/typeschema@typeschema/main and a schema libraryNofirstError | all
ValibotvalibotResolver from @hookform/resolvers/valibotvalibotYesfirstError | all
VestvestResolver from @hookform/resolvers/vestvestNofirstError | all
VineJSvineResolver from @hookform/resolvers/vine@vinejs/vineYesfirstError | all
YupyupResolver from @hookform/resolvers/yupyupYesfirstError | all
ZodzodResolver from @hookform/resolvers/zodzodYesfirstError | all

Resolver options

Resolvers accept an optional third argument:

resolver(schema, schemaOptions, {
mode: "async", // or "sync"
raw: false,
})
  • Async mode is the default. Use sync only when the schema performs no asynchronous work.
  • Set raw: true when submitted values should remain unparsed instead of using the schema's transformed output.
  • Pass a form value type to useForm when 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.