import { ValidationContext } from './fw'; /** * Validates that the value is declared on the object, i.e. hasOwnProperty * The value can be undefined, null or any other falsy expression. * */ export declare const declared: { name: string; validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; }; /** * Validates that the value is present, i.e. the value is not undefined and not null. */ export declare const required: { name: string; validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; }; /** * Checks if the value is an instance of it's type. * If instanceOf check fails and the type is Boolean, String or Number and additional check is done * using the typeof operator. */ export declare const instanceOf: { name: string; validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; }; /** * Validates that the value is greater than or equal to the minimum. * Does not validate that value is a number. */ export declare class Min { private min; readonly name: string; constructor(min: number); validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; } /** * Validates that the value is less than or equal to the maximum. * Does not validate that value is a number. */ export declare class Max { private max; readonly name: string; constructor(max: number); validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; } /** * Validates that the value is between (but not equal to) the minimum and maximum. * Does not validate that value is a number. */ export declare class Between { private min; private max; readonly name: string; constructor(min: number, max: number); validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; } export declare const validators: { declared: { name: string; validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; }; required: { name: string; validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; }; instanceOf: { name: string; validate(ctx: ValidationContext): boolean; errorMessage(ctx: ValidationContext): string; }; Min: typeof Min; Max: typeof Max; Between: typeof Between; };