import { Validator } from "./validators"; type StrDict = { 0: string; 1: string[]; 2: Optional extends true ? { [prop in keyof OBJ]+?: StrDict; } : { [prop in keyof OBJ]: StrDict; }; }[OBJ extends (string | number | boolean) ? 0 : OBJ extends string[] ? 1 : OBJ extends { [prop: string]: any; } ? 2 : never]; export interface ArrayValidatorOpts { required?: boolean; min?: number; max?: number; } export interface ArrayValidatorMsgs { required?: string; not_in_range?: string; invalid_format?: string; } export declare class ArrayValidator { readonly validator: Validator | ObjectValidator; readonly opts: ArrayValidatorOpts; readonly str?: string[] | StrDict[]; readonly obj?: TYPE[] | { [key in keyof TYPE]: any; }[]; readonly err?: string[] | StrDict[]; readonly valid?: boolean; constructor(validator: Validator | ObjectValidator, opts?: ArrayValidatorOpts); validate(data: string[] | TYPE[]): this; } type ObjectValidators = { [key in keyof TYPE]?: Validator | ObjectValidator | ArrayValidator; }; export declare class ObjectValidator { readonly validators: ObjectValidators; readonly str?: StrDict; readonly obj?: { [key in keyof TYPE]: any; }; readonly err?: StrDict; readonly valid?: boolean; constructor(validators?: ObjectValidators); addValidator(field: keyof TYPE, validator: Validator | ObjectValidator | ArrayValidator): this; validate(data: StrDict, defaults?: StrDict): this; format(data: { [key in keyof TYPE]: any; }): this; } export {};