UNPKG

@korbiniankuhn/validator

Version:

Validate object schemas for js, expressjs, angular and mongoose.

34 lines (33 loc) 1.22 kB
export declare const validateAny: (value: any, { defaultValue, allowed, required, message, not, only, nullAsUndefined }: { defaultValue: any; allowed: any; required: any; message: any; not: any; only: any; nullAsUndefined: any; }) => any; export declare const validateFunctionSync: (func: Function, value: any) => any; export declare const validateFunctionAsync: (func: any, value: any) => Promise<any>; export declare const validateOnly: (only: any, value: any, message: any) => void; export declare const validateNot: (not: any, value: any, message: any) => void; export declare const validateAnySync: (value: any, { defaultValue, allowed, required, message, not, only, func, nullAsUndefined }: { defaultValue: any; allowed: any; required: any; message: any; not: any; only: any; func: any; nullAsUndefined: any; }) => any; export declare const validateAnyAsync: (value: any, { defaultValue, allowed, required, message, not, only, func, nullAsUndefined }: { defaultValue: any; allowed: any; required: any; message: any; not: any; only: any; func: any; nullAsUndefined: any; }) => Promise<any>;