import type { IValidator } from '../i-validator'; import type { IFormHandlerValidator } from './types'; type TypeToValidate = { [K in keyof T]: T[K]; }; export declare class FormValidationHandler = TypeToValidate, TSubmitResult = void> implements IValidator { readonly formStringified: Record; readonly modified: Record; readonly isValid: boolean; readonly isModified: boolean; private _form; private _errors; private _touched; private _isValidating; private _isSubmitting; private _validator; private _initialValues; private readonly _onSubmit; private readonly _onReset; private _initials; constructor(context: { initialValues: T; validator: IFormHandlerValidator; onSubmit?: (values: T) => TSubmitResult; onReset?: () => void; }); get form(): T; get errors(): { [P in keyof Partial]: string; }; get touched(): Record; get isValidating(): boolean; get isSubmitting(): boolean; updateField: (field: K, value: T[K]) => void; updateValidateField: (field: K, value: T[K]) => Promise; updateTouched: (field: keyof T, value: boolean) => void; updateTouchedForAllFields: (value: boolean) => void; /** * Sets an error the schema can't produce (a server-side rejection), marking the field touched so it renders. * The next validation pass overwrites it — `validateField` (blur by default), `validate()`, `handleSubmit`. */ setFieldError: (field: keyof T, message: string) => void; /** Batch {@link setFieldError} — skips `undefined` entries, same overwrite-on-next-validation semantics. */ setFieldErrors: (errors: Partial>) => void; validateField: (field: keyof T) => Promise; updateInitialValues: (newValues: T) => void; updateValidator: (validator: IFormHandlerValidator) => void; handleReset: () => void; handleInputValueChanged: (event: Event) => Promise; validate: (values?: T) => Promise; handleSubmit: (event: Event | null) => Promise; dispose(): void; private validateFieldValue; private stringify; } export {};