export declare type ValidationFunction = (val: any, state: S) => boolean | ((val: any) => boolean); export declare type ForceValidationState = (validationState: ValidationState) => void; export declare type GetAllErrors = (property: keyof S) => string[]; export declare type GetError = (property: keyof S) => string; export declare type GetFieldValid = (property: keyof S) => boolean; export declare type ResetValidationState = () => void; export declare type Validate = (property: keyof S, value: unknown, state?: S) => boolean; export declare type ValidateAll = (state: S, keys?: (keyof S)[]) => boolean; export declare type ValidateCustom = (vals: CustomValidation[]) => boolean; export declare type ValidateIfTrue = (property: keyof S, value: unknown, state?: S) => boolean; export declare type ValidateOnBlur = (state: S) => (event: any) => any; export declare type ValidateOnChange = (onChange: (event: any) => any, state: S) => (event: any) => any; export interface ValidationObject { forceValidationState: ForceValidationState; getError: GetError; getAllErrors: GetAllErrors; getFieldValid: GetFieldValid; isValid: boolean; resetValidationState: ResetValidationState; validate: Validate; validateAll: ValidateAll; validateCustom: ValidateCustom; validateIfTrue: ValidateIfTrue; validateOnBlur: ValidateOnBlur; validateOnChange: ValidateOnChange; validationErrors: string[]; validationState: ValidationState; } export interface ValidationProps { errorMessage: string; validation: ValidationFunction; } export interface ValidationSchema { [key: string]: ValidationProps[]; } export interface ValidationState { [key: string]: { isValid: boolean; errors: string[]; }; } export interface CustomValidation { key: string; value: any; state?: any; }