export declare type RuleType = 'string' | 'number' | 'boolean' | 'method' | 'regexp' | 'integer' | 'float' | 'array' | 'object' | 'enum' | 'date' | 'url' | 'hex' | 'email' | 'any'; export interface RuleItem { type?: RuleType; required?: boolean; pattern?: RegExp | string; min?: number; max?: number; len?: number; enum?: Array; whitespace?: boolean; fields?: Rules; options?: ValidateOption; defaultField?: RuleItem; transform?: (value: any) => any; message?: string | (() => string); asyncValidator?: (rule: Rules, value: any, callback: (error: string | string[] | void) => void, source: ValidateSource, options: ValidateOption) => void | Promise; validator?: (rule: Rules, value: any, callback: (error: string | string[] | void) => void, source: ValidateSource, options: ValidateOption) => void; } export interface Rules { [field: string]: RuleItem | RuleItem[]; } export interface ValidateSource { [field: string]: any; } export interface ValidateOption { suppressWarning?: boolean; first?: boolean; firstFields?: boolean | string[]; }