UNPKG

817 BTypeScriptView Raw
1import { ValidationOptions } from '../decorator/ValidationOptions';
2/**
3 * Constructor arguments for ValidationMetadata class.
4 */
5export interface ValidationMetadataArgs {
6 /**
7 * Validation type.
8 */
9 type: string;
10 /**
11 * Object that is used to be validated.
12 */
13 target: Function | string;
14 /**
15 * Property of the object to be validated.
16 */
17 propertyName: string;
18 /**
19 * Constraint class that performs validation. Used only for custom validations.
20 */
21 constraintCls?: Function;
22 /**
23 * Array of constraints of this validation.
24 */
25 constraints?: any[];
26 /**
27 * Validation options.
28 */
29 validationOptions?: ValidationOptions;
30 /**
31 * Extra options specific to validation type.
32 */
33 validationTypeOptions?: any;
34}