UNPKG

@modular-forms/react

Version:

The modular and type-safe form library for React

11 lines (10 loc) 430 B
import { type GenericSchema, type GenericSchemaAsync } from 'valibot'; import type { FieldValue, ValidateField } from '../types'; /** * Creates a validation functions that parses the Valibot schema of a field. * * @param schema A Valibot schema. * * @returns A validation function. */ export declare function valiField<TFieldValue extends FieldValue>(schema: GenericSchema | GenericSchemaAsync): ValidateField<TFieldValue>;