UNPKG

houseform

Version:

Simple to use React forms, where your validation and UI code live together in harmony.

5 lines (4 loc) 339 B
import type { ZodError, ZodTypeAny } from "zod"; import { FormInstance } from "../form/types"; export declare function validate<T, F>(val: T, form: FormInstance<F>, validator: ZodTypeAny | ((val: T, form: FormInstance<F>) => Promise<boolean>)): Promise<any>; export declare function getValidationError(error: ZodError | string): string[];