export declare function validation(item: any): {
    context: any;
    error: string | null;
    isRequired(msg?: string): {
        context: any;
        error: string | null;
        isRequired(msg?: string): any;
        isString(msg?: string): any;
        toInt(): any;
        isInteger(msg?: string): any;
        min(size: number, msg?: string | undefined): any;
        max(size: number, msg?: string | undefined): any;
    };
    isString(msg?: string): {
        context: any;
        error: string | null;
        isRequired(msg?: string): any;
        isString(msg?: string): any;
        toInt(): any;
        isInteger(msg?: string): any;
        min(size: number, msg?: string | undefined): any;
        max(size: number, msg?: string | undefined): any;
    };
    toInt(): {
        context: any;
        error: string | null;
        isRequired(msg?: string): any;
        isString(msg?: string): any;
        toInt(): any;
        isInteger(msg?: string): any;
        min(size: number, msg?: string | undefined): any;
        max(size: number, msg?: string | undefined): any;
    };
    isInteger(msg?: string): {
        context: any;
        error: string | null;
        isRequired(msg?: string): any;
        isString(msg?: string): any;
        toInt(): any;
        isInteger(msg?: string): any;
        min(size: number, msg?: string | undefined): any;
        max(size: number, msg?: string | undefined): any;
    };
    min(size: number, msg?: string | undefined): {
        context: any;
        error: string | null;
        isRequired(msg?: string): any;
        isString(msg?: string): any;
        toInt(): any;
        isInteger(msg?: string): any;
        min(size: number, msg?: string | undefined): any;
        max(size: number, msg?: string | undefined): any;
    };
    max(size: number, msg?: string | undefined): {
        context: any;
        error: string | null;
        isRequired(msg?: string): any;
        isString(msg?: string): any;
        toInt(): any;
        isInteger(msg?: string): any;
        min(size: number, msg?: string | undefined): any;
        max(size: number, msg?: string | undefined): any;
    };
};
/** creates validation error dictionary */
export declare function createErrorRefs<T extends Object>(obj: T): ErrorRef<T>;
export type ErrorRef<T> = {
    [K in keyof T]: T[K] extends string | number | boolean ? string | null : T[K] extends Array<infer U> ? ErrorRef<U>[] : ErrorRef<T[K]>;
};
export declare function hasError<T>(errorRef: ErrorRef<T>): boolean;
