database-petani-mobile/node_modules/@hookform/resolvers/vest/dist/vest.d.ts
2026-02-23 16:39:35 +07:00

21 lines
653 B
TypeScript

import type { Resolver } from './types';
/**
* Creates a resolver for react-hook-form using Vest validation
* @param {Function} schema - The Vest validation schema
* @param {Object} _ - Unused parameter
* @param {Object} resolverOptions - Additional resolver configuration
* @param {string} [resolverOptions.mode='async'] - Validation mode
* @returns {Resolver} A resolver function compatible with react-hook-form
* @example
* const schema = vest.create((data) => {
* if (!data.name) {
* return 'Name is required';
* }
* });
*
* useForm({
* resolver: vestResolver(schema)
* });
*/
export declare const vestResolver: Resolver;