UNPKG

niceform-hook

Version:
13 lines 674 B
import type { FieldErrors, FieldValues, UseFormReturn } from "react-hook-form"; import type { Field } from "../types"; interface UseOnErrorDuringSubmitArgs<FieldProps extends Record<string, any> = Record<string, any>> { methods: UseFormReturn<any>; getField(name: string): Field | undefined; onErrorDuringSubmit?(errors: FieldErrors, context: { methods: UseFormReturn<any>; getField(name: string): Field<FieldProps, FieldValues> | undefined; }): any; } export declare function useOnErrorDuringSubmit({ getField, methods, onErrorDuringSubmit }: UseOnErrorDuringSubmitArgs): void; export {}; //# sourceMappingURL=useOnErrorDuringSubmit.d.ts.map