UNPKG

@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) 865 B
import { FieldValues, Resolver } from 'react-hook-form'; import { BaseSchema, BaseSchemaAsync, Config, InferIssue } from 'valibot'; export declare function valibotResolver<Input extends FieldValues, Context, Output>(schema: BaseSchema<Input, Output, any> | BaseSchemaAsync<Input, Output, any>, schemaOptions?: Partial<Omit<Config<InferIssue<typeof schema>>, 'abortPipeEarly' | 'skipPipe'>>, resolverOptions?: { mode?: 'async' | 'sync'; raw?: false; }): Resolver<Input, Context, Output>; export declare function valibotResolver<Input extends FieldValues, Context, Output>(schema: BaseSchema<Input, Output, any> | BaseSchemaAsync<Input, Output, any>, schemaOptions: Partial<Omit<Config<InferIssue<typeof schema>>, 'abortPipeEarly' | 'skipPipe'>> | undefined, resolverOptions: { mode?: 'async' | 'sync'; raw: true; }): Resolver<Input, Context, Input>;