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

12 lines (11 loc) 791 B
import { VineValidator } from '@vinejs/vine'; import { ConstructableSchema, ValidationOptions } from '@vinejs/vine/build/src/types'; import { FieldValues, Resolver } from 'react-hook-form'; export declare function vineResolver<Input extends FieldValues, Context, Output>(schema: VineValidator<ConstructableSchema<Input, Output, Output>, any>, schemaOptions?: ValidationOptions<any>, resolverOptions?: { mode?: 'async' | 'sync'; raw?: false; }): Resolver<Input, Context, Output>; export declare function vineResolver<Input extends FieldValues, Context, Output>(schema: VineValidator<ConstructableSchema<Input, Output, Output>, any>, schemaOptions: ValidationOptions<any> | undefined, resolverOptions: { mode?: 'async' | 'sync'; raw: true; }): Resolver<Input, Context, Input>;