@hookform/resolvers
Version:
React Hook Form validation resolvers: Yup, Joi, Superstruct, Zod, Vest, Class Validator, io-ts, Nope, computed-types, TypeBox, arktype, Typanion, Effect-TS and VineJS
11 lines (10 loc) • 619 B
TypeScript
import { FieldValues, Resolver } from 'react-hook-form';
import { z } from 'zod';
export declare function zodResolver<Input extends FieldValues, Context, Output>(schema: z.ZodSchema<Output, any, Input>, schemaOptions?: Partial<z.ParseParams>, resolverOptions?: {
mode?: 'async' | 'sync';
raw?: false;
}): Resolver<Input, Context, Output>;
export declare function zodResolver<Input extends FieldValues, Context, Output>(schema: z.ZodSchema<Output, any, Input>, schemaOptions: Partial<z.ParseParams> | undefined, resolverOptions: {
mode?: 'async' | 'sync';
raw: true;
}): Resolver<Input, Context, Input>;