UNPKG

class-validator

Version:

Class-based validation with Typescript / ES6 / ES5 using decorators or validation schemas. Supports both node.js and browser

35 lines (34 loc) 817 B
import { ValidationOptions } from "../decorator/ValidationOptions"; /** * Constructor arguments for ValidationMetadata class. */ export interface ValidationMetadataArgs { /** * Validation type. */ type: string; /** * Object that is used to be validated. */ target: Function | string; /** * Property of the object to be validated. */ propertyName: string; /** * Constraint class that performs validation. Used only for custom validations. */ constraintCls?: Function; /** * Array of constraints of this validation. */ constraints?: any[]; /** * Validation options. */ validationOptions?: ValidationOptions; /** * Extra options specific to validation type. */ validationTypeOptions?: any; }