UNPKG

639 BTypeScriptView Raw
1import { ValidationOptions } from '../ValidationOptions';
2/**
3 * Registers custom validator class.
4 */
5export declare function ValidatorConstraint(options?: {
6 name?: string;
7 async?: boolean;
8}): (target: Function) => void;
9/**
10 * Performs validation based on the given custom validation class.
11 * Validation class must be decorated with ValidatorConstraint decorator.
12 */
13export declare function Validate(constraintClass: Function, validationOptions?: ValidationOptions): PropertyDecorator;
14export declare function Validate(constraintClass: Function, constraints?: any[], validationOptions?: ValidationOptions): PropertyDecorator;