{"version":3,"file":"index.umd.min.js","sources":["../../src/metadata/ValidationMetadata.ts","../../src/validation-schema/ValidationSchemaToMetadataTransformer.ts","../../src/metadata/MetadataStorage.ts","../../src/validation/ValidationError.ts","../../src/validation/ValidationTypes.ts","../../src/validation/ValidationUtils.ts","../../src/utils.ts","../../src/validation/ValidationExecutor.ts","../../src/validation/Validator.ts","../../src/container.ts","../../src/metadata/ConstraintMetadata.ts","../../src/register-decorator.ts","../../src/decorator/common/ValidateBy.ts","../../src/decorator/common/IsDefined.ts","../../src/decorator/common/IsLatLong.ts","../../src/decorator/common/IsLatitude.ts","../../src/decorator/common/IsLongitude.ts","../../src/decorator/common/Equals.ts","../../src/decorator/common/NotEquals.ts","../../src/decorator/common/IsEmpty.ts","../../src/decorator/common/IsNotEmpty.ts","../../src/decorator/common/IsIn.ts","../../src/decorator/common/IsNotIn.ts","../../src/decorator/number/IsDivisibleBy.ts","../../src/decorator/number/IsPositive.ts","../../src/decorator/number/IsNegative.ts","../../src/decorator/number/Max.ts","../../src/decorator/number/Min.ts","../../src/decorator/date/MinDate.ts","../../src/decorator/date/MaxDate.ts","../../src/decorator/string/Contains.ts","../../src/decorator/string/NotContains.ts","../../src/decorator/string/IsAlpha.ts","../../src/decorator/string/IsAlphanumeric.ts","../../src/decorator/string/IsDecimal.ts","../../src/decorator/string/IsAscii.ts","../../src/decorator/string/IsBase64.ts","../../src/decorator/string/IsByteLength.ts","../../src/decorator/string/IsCreditCard.ts","../../src/decorator/string/IsCurrency.ts","../../src/decorator/string/IsEmail.ts","../../src/decorator/string/IsFQDN.ts","../../src/decorator/string/IsFullWidth.ts","../../src/decorator/string/IsHalfWidth.ts","../../src/decorator/string/IsVariableWidth.ts","../../src/decorator/string/IsHexColor.ts","../../src/decorator/string/IsHexadecimal.ts","../../src/decorator/ValidationOptions.ts","../../src/decorator/string/IsMacAddress.ts","../../src/decorator/string/IsIP.ts","../../src/decorator/string/IsPort.ts","../../src/decorator/string/IsISBN.ts","../../src/decorator/string/IsISIN.ts","../../src/decorator/string/IsISO8601.ts","../../src/decorator/string/IsJSON.ts","../../src/decorator/string/IsJWT.ts","../../src/decorator/string/IsLowercase.ts","../../src/decorator/string/IsMobilePhone.ts","../../src/decorator/string/IsISO31661Alpha2.ts","../../src/decorator/string/IsISO31661Alpha3.ts","../../src/decorator/string/IsMongoId.ts","../../src/decorator/string/IsMultibyte.ts","../../src/decorator/string/IsSurrogatePair.ts","../../src/decorator/string/IsUrl.ts","../../src/decorator/string/IsUUID.ts","../../src/decorator/string/IsFirebasePushId.ts","../../src/decorator/string/IsUppercase.ts","../../src/decorator/string/Length.ts","../../src/decorator/string/MaxLength.ts","../../src/decorator/string/MinLength.ts","../../src/decorator/string/Matches.ts","../../src/decorator/string/IsPhoneNumber.ts","../../src/decorator/string/IsMilitaryTime.ts","../../src/decorator/string/IsHash.ts","../../src/decorator/string/IsISSN.ts","../../src/decorator/string/IsDateString.ts","../../src/decorator/string/IsBooleanString.ts","../../src/decorator/string/IsNumberString.ts","../../src/decorator/string/IsBase32.ts","../../src/decorator/string/IsBIC.ts","../../src/decorator/string/IsBtcAddress.ts","../../src/decorator/string/IsDataURI.ts","../../src/decorator/string/IsEAN.ts","../../src/decorator/string/IsEthereumAddress.ts","../../src/decorator/string/IsHSL.ts","../../src/decorator/string/IsIBAN.ts","../../src/decorator/string/IsIdentityCard.ts","../../src/decorator/string/IsISRC.ts","../../src/decorator/string/IsLocale.ts","../../src/decorator/string/IsMagnetURI.ts","../../src/decorator/string/IsMimeType.ts","../../src/decorator/string/IsOctal.ts","../../src/decorator/string/IsPassportNumber.ts","../../src/decorator/string/IsPostalCode.ts","../../src/decorator/string/IsRFC3339.ts","../../src/decorator/string/IsRgbColor.ts","../../src/decorator/string/IsSemVer.ts","../../src/decorator/typechecker/IsBoolean.ts","../../src/decorator/typechecker/IsDate.ts","../../src/decorator/typechecker/IsNumber.ts","../../src/decorator/typechecker/IsEnum.ts","../../src/decorator/typechecker/IsInt.ts","../../src/decorator/typechecker/IsString.ts","../../src/decorator/typechecker/IsArray.ts","../../src/decorator/typechecker/IsObject.ts","../../src/decorator/array/ArrayContains.ts","../../src/decorator/array/ArrayNotContains.ts","../../src/decorator/array/ArrayNotEmpty.ts","../../src/decorator/array/ArrayMinSize.ts","../../src/decorator/array/ArrayMaxSize.ts","../../src/decorator/array/ArrayUnique.ts","../../src/decorator/object/IsNotEmptyObject.ts","../../src/decorator/object/IsInstance.ts","../../src/decorator/common/Allow.ts","../../src/decorator/common/IsOptional.ts","../../src/decorator/common/Validate.ts","../../src/decorator/common/ValidateIf.ts","../../src/decorator/common/ValidateNested.ts","../../src/decorator/common/ValidatePromise.ts","../../src/index.ts"],"sourcesContent":["import {ValidationMetadataArgs} from \"./ValidationMetadataArgs\";\nimport {ValidationArguments} from \"../validation/ValidationArguments\";\n\n/**\n * This metadata contains validation rules.\n */\nexport class ValidationMetadata {\n\n // -------------------------------------------------------------------------\n // Properties\n // -------------------------------------------------------------------------\n\n /**\n * Validation type.\n */\n type: string;\n\n /**\n * Target class to which this validation is applied.\n */\n target: Function|string;\n\n /**\n * Property of the object to be validated.\n */\n propertyName: string;\n\n /**\n * Constraint class that performs validation. Used only for custom validations.\n */\n constraintCls: Function;\n\n /**\n * Array of constraints of this validation.\n */\n constraints: any[];\n\n /**\n * Validation message to be shown in the case of error.\n */\n message: string|((args: ValidationArguments) => string);\n\n /**\n * Validation groups used for this validation.\n */\n groups: string[] = [];\n\n /**\n * Indicates if validation must be performed always, no matter of validation groups used.\n */\n always: boolean = false;\n\n /**\n * Specifies if validated value is an array and each of its item must be validated.\n */\n each: boolean = false;\n\n /*\n * A transient set of data passed through to the validation result for response mapping\n */\n context?: any = undefined;\n\n /**\n * Extra options specific to validation type.\n */\n validationTypeOptions: any;\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(args: ValidationMetadataArgs) {\n this.type = args.type;\n this.target = args.target;\n this.propertyName = args.propertyName;\n this.constraints = args.constraints;\n this.constraintCls = args.constraintCls;\n this.validationTypeOptions = args.validationTypeOptions;\n if (args.validationOptions) {\n this.message = args.validationOptions.message;\n this.groups = args.validationOptions.groups;\n this.always = args.validationOptions.always;\n this.each = args.validationOptions.each;\n this.context = args.validationOptions.context;\n }\n }\n\n}\n","import {ValidationSchema} from \"./ValidationSchema\";\nimport {ValidationMetadata} from \"../metadata/ValidationMetadata\";\nimport {ValidationMetadataArgs} from \"../metadata/ValidationMetadataArgs\";\nimport {ValidationOptions} from \"../decorator/ValidationOptions\";\nimport {ValidationTypes} from \"../validation/ValidationTypes\";\n\n/**\n * Used to transform validation schemas to validation metadatas.\n */\nexport class ValidationSchemaToMetadataTransformer {\n\n transform(schema: ValidationSchema): ValidationMetadata[] {\n const metadatas: ValidationMetadata[] = [];\n Object.keys(schema.properties).forEach(property => {\n schema.properties[property].forEach(validation => {\n const validationOptions: ValidationOptions = {\n message: validation.message,\n groups: validation.groups,\n always: validation.always,\n each: validation.each\n };\n const args: ValidationMetadataArgs = {\n type: validation.type,\n target: schema.name,\n propertyName: property,\n constraints: validation.constraints,\n validationTypeOptions: validation.options,\n validationOptions: validationOptions\n };\n metadatas.push(new ValidationMetadata(args));\n });\n });\n return metadatas;\n }\n\n}\n","import {ValidationMetadata} from \"./ValidationMetadata\";\nimport {ConstraintMetadata} from \"./ConstraintMetadata\";\nimport {ValidationSchema} from \"../validation-schema/ValidationSchema\";\nimport {ValidationSchemaToMetadataTransformer} from \"../validation-schema/ValidationSchemaToMetadataTransformer\";\n\n/**\n * Gets metadata storage.\n * Metadata storage follows the best practices and stores metadata in a global variable.\n */\nexport function getMetadataStorage(): MetadataStorage {\n if (typeof window !== \"undefined\") {\n (window as any).global = window;\n }\n if (!(global as any).classValidatorMetadataStorage)\n (global as any).classValidatorMetadataStorage = new MetadataStorage();\n\n return (global as any).classValidatorMetadataStorage;\n}\n\n/**\n * Storage all metadatas.\n */\nexport class MetadataStorage {\n\n // -------------------------------------------------------------------------\n // Private properties\n // -------------------------------------------------------------------------\n\n private validationMetadatas: ValidationMetadata[] = [];\n private constraintMetadatas: ConstraintMetadata[] = [];\n\n get hasValidationMetaData() {\n return !!this.validationMetadatas.length;\n }\n\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n\n /**\n * Adds a new validation metadata.\n */\n addValidationSchema(schema: ValidationSchema) {\n const validationMetadatas = new ValidationSchemaToMetadataTransformer().transform(schema);\n validationMetadatas.forEach(validationMetadata => this.addValidationMetadata(validationMetadata));\n }\n\n /**\n * Adds a new validation metadata.\n */\n addValidationMetadata(metadata: ValidationMetadata) {\n this.validationMetadatas.push(metadata);\n }\n\n /**\n * Adds a new constraint metadata.\n */\n addConstraintMetadata(metadata: ConstraintMetadata) {\n this.constraintMetadatas.push(metadata);\n }\n\n /**\n * Groups metadata by their property names.\n */\n groupByPropertyName(metadata: ValidationMetadata[]): { [propertyName: string]: ValidationMetadata[] } {\n const grouped: { [propertyName: string]: ValidationMetadata[] } = {};\n metadata.forEach(metadata => {\n if (!grouped[metadata.propertyName])\n grouped[metadata.propertyName] = [];\n grouped[metadata.propertyName].push(metadata);\n });\n return grouped;\n }\n\n /**\n * Gets all validation metadatas for the given object with the given groups.\n */\n getTargetValidationMetadatas(targetConstructor: Function, targetSchema: string, groups?: string[]): ValidationMetadata[] {\n\n // get directly related to a target metadatas\n const originalMetadatas = this.validationMetadatas.filter(metadata => {\n if (metadata.target !== targetConstructor && metadata.target !== targetSchema)\n return false;\n if (metadata.always)\n return true;\n if (groups && groups.length > 0)\n return metadata.groups && !!metadata.groups.find(group => groups.indexOf(group) !== -1);\n\n return true;\n });\n\n // get metadatas for inherited classes\n const inheritedMetadatas = this.validationMetadatas.filter(metadata => {\n // if target is a string it's means we validate agains a schema, and there is no inheritance support for schemas\n if (typeof metadata.target === \"string\")\n return false;\n if (metadata.target === targetConstructor)\n return false;\n if (metadata.target instanceof Function &&\n !(targetConstructor.prototype instanceof (metadata.target as Function)))\n return false;\n if (metadata.always)\n return true;\n if (groups && groups.length > 0)\n return metadata.groups && !!metadata.groups.find(group => groups.indexOf(group) !== -1);\n\n return true;\n });\n\n // filter out duplicate metadatas, prefer original metadatas instead of inherited metadatas\n const uniqueInheritedMetadatas = inheritedMetadatas.filter(inheritedMetadata => {\n return !originalMetadatas.find(originalMetadata => {\n return originalMetadata.propertyName === inheritedMetadata.propertyName &&\n originalMetadata.type === inheritedMetadata.type;\n });\n });\n\n return originalMetadatas.concat(uniqueInheritedMetadatas);\n }\n\n /**\n * Gets all validator constraints for the given object.\n */\n getTargetValidatorConstraints(target: Function): ConstraintMetadata[] {\n return this.constraintMetadatas.filter(metadata => metadata.target === target);\n }\n\n}\n","/**\n * Validation error description.\n */\nexport class ValidationError {\n\n /**\n * Object that was validated.\n *\n * OPTIONAL - configurable via the ValidatorOptions.validationError.target option\n */\n target?: Object;\n\n /**\n * Object's property that haven't pass validation.\n */\n property: string;\n\n /**\n * Value that haven't pass a validation.\n *\n * OPTIONAL - configurable via the ValidatorOptions.validationError.value option\n */\n value?: any;\n\n /**\n * Constraints that failed validation with error messages.\n */\n constraints?: {\n [type: string]: string\n };\n\n /**\n * Contains all nested validation errors of the property.\n */\n children: ValidationError[];\n\n\n /*\n * A transient set of data passed through to the validation result for response mapping\n */\n contexts?: {\n [type: string]: any\n };\n\n /**\n *\n * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability\n * @param hasParent true when the error is a child of an another one\n * @param parentPath path as string to the parent of this property\n */\n toString(shouldDecorate: boolean = false, hasParent: boolean = false, parentPath: string = ``): string {\n const boldStart = shouldDecorate ? `\\x1b[1m` : ``;\n const boldEnd = shouldDecorate ? `\\x1b[22m` : ``;\n const propConstraintFailed = (propertyName: string): string => ` - property ${boldStart}${parentPath}${propertyName}${boldEnd} has failed the following constraints: ${boldStart}${Object.keys(this.constraints).join(`, `)}${boldEnd} \\n`;\n\n if (!hasParent) {\n return `An instance of ${boldStart}${this.target ? this.target.constructor.name : \"an object\"}${boldEnd} has failed the validation:\\n` +\n (this.constraints ? propConstraintFailed(this.property) : ``) +\n this.children\n .map(childError => childError.toString(shouldDecorate, true, this.property))\n .join(``);\n } else {\n // we format numbers as array indexes for better readability.\n const formattedProperty = Number.isInteger(+this.property) ? `[${this.property}]` : `${parentPath ? `.` : ``}${this.property}`;\n\n if (this.constraints) {\n return propConstraintFailed(formattedProperty);\n } else {\n return this.children\n .map(childError => childError.toString(shouldDecorate, true, `${parentPath}${formattedProperty}`, ))\n .join(``);\n }\n }\n }\n}\n","/**\n * Validation types.\n */\nexport class ValidationTypes {\n\n /* system */\n static CUSTOM_VALIDATION = \"customValidation\"; // done\n static NESTED_VALIDATION = \"nestedValidation\"; // done\n static PROMISE_VALIDATION = \"promiseValidation\"; // done\n static CONDITIONAL_VALIDATION = \"conditionalValidation\"; // done\n static WHITELIST = \"whitelistValidation\"; // done\n static IS_DEFINED = \"isDefined\"; // done\n\n /**\n * Checks if validation type is valid.\n */\n static isValid(type: string) {\n return type !== \"isValid\" &&\n type !== \"getMessage\" &&\n Object.keys(this).map(key => (this as any)[key]).indexOf(type) !== -1;\n }\n\n}\n","import {ValidationArguments} from \"./ValidationArguments\";\n\nexport class ValidationUtils {\n\n static replaceMessageSpecialTokens(message: string|((args: ValidationArguments) => string),\n validationArguments: ValidationArguments): string {\n\n let messageString: string;\n if (message instanceof Function) {\n messageString = (message as (args: ValidationArguments) => string)(validationArguments);\n\n } else if (typeof message === \"string\") {\n messageString = message as string;\n }\n\n if (messageString && validationArguments.constraints instanceof Array) {\n validationArguments.constraints.forEach((constraint, index) => {\n messageString = messageString.replace(new RegExp(`\\\\$constraint${index + 1}`, \"g\"), constraint);\n });\n }\n\n if (messageString && validationArguments.value !== undefined && validationArguments.value !== null && typeof validationArguments.value === \"string\")\n messageString = messageString.replace(/\\$value/g, validationArguments.value);\n if (messageString)\n messageString = messageString.replace(/\\$property/g, validationArguments.property);\n if (messageString)\n messageString = messageString.replace(/\\$target/g, validationArguments.targetName);\n\n return messageString;\n }\n \n}","// https://github.com/TylorS/typed-is-promise/blob/abf1514e1b6961adfc75765476b0debb96b2c3ae/src/index.ts\n\nexport function isPromise(p: any): p is Promise {\n return p !== null && typeof p === \"object\" && typeof p.then === \"function\";\n}\n\n/**\n * Convert Map, Set to Array\n */\nexport function convertToArray(val: Array | Set | Map): Array {\n if (val instanceof Map) {\n return Array.from(val.values());\n }\n return Array.isArray(val) ? val : Array.from(val);\n}\n","import {Validator} from \"./Validator\";\nimport {ValidationError} from \"./ValidationError\";\nimport {ValidationMetadata} from \"../metadata/ValidationMetadata\";\nimport {ValidatorOptions} from \"./ValidatorOptions\";\nimport {ValidationTypes} from \"./ValidationTypes\";\nimport {ConstraintMetadata} from \"../metadata/ConstraintMetadata\";\nimport {ValidationArguments} from \"./ValidationArguments\";\nimport {ValidationUtils} from \"./ValidationUtils\";\nimport {isPromise, convertToArray} from \"../utils\";\nimport { getMetadataStorage } from \"../metadata/MetadataStorage\";\n\n/**\n * Executes validation over given object.\n */\nexport class ValidationExecutor {\n\n // -------------------------------------------------------------------------\n // Properties\n // -------------------------------------------------------------------------\n\n awaitingPromises: Promise[] = [];\n ignoreAsyncValidations: boolean = false;\n\n // -------------------------------------------------------------------------\n // Private Properties\n // -------------------------------------------------------------------------\n\n private metadataStorage = getMetadataStorage();\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(private validator: Validator,\n private validatorOptions?: ValidatorOptions) {\n }\n\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n\n execute(object: Object, targetSchema: string, validationErrors: ValidationError[]) {\n /**\n * If there is no metadata registered it means possibly the dependencies are not flatterned and\n * more than one instance is used.\n *\n * TODO: This needs proper handling, forcing to use the same container or some other proper solution.\n */\n if (!this.metadataStorage.hasValidationMetaData) {\n console.warn(`No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies.`);\n }\n\n const groups = this.validatorOptions ? this.validatorOptions.groups : undefined;\n const targetMetadatas = this.metadataStorage.getTargetValidationMetadatas(object.constructor, targetSchema, groups);\n const groupedMetadatas = this.metadataStorage.groupByPropertyName(targetMetadatas);\n\n if (this.validatorOptions && this.validatorOptions.forbidUnknownValues && !targetMetadatas.length) {\n const validationError = new ValidationError();\n\n if (!this.validatorOptions ||\n !this.validatorOptions.validationError ||\n this.validatorOptions.validationError.target === undefined ||\n this.validatorOptions.validationError.target === true)\n validationError.target = object;\n\n validationError.value = undefined;\n validationError.property = undefined;\n validationError.children = [];\n validationError.constraints = { unknownValue: \"an unknown value was passed to the validate function\" };\n\n validationErrors.push(validationError);\n\n return;\n }\n\n if (this.validatorOptions && this.validatorOptions.whitelist)\n this.whitelist(object, groupedMetadatas, validationErrors);\n\n // General validation\n Object.keys(groupedMetadatas).forEach(propertyName => {\n const value = (object as any)[propertyName];\n const definedMetadatas = groupedMetadatas[propertyName].filter(metadata => metadata.type === ValidationTypes.IS_DEFINED);\n const metadatas = groupedMetadatas[propertyName].filter(\n metadata => metadata.type !== ValidationTypes.IS_DEFINED && metadata.type !== ValidationTypes.WHITELIST);\n\n if (value instanceof Promise && metadatas.find(metadata => metadata.type === ValidationTypes.PROMISE_VALIDATION)) {\n this.awaitingPromises.push(value.then((resolvedValue) => {\n this.performValidations(object, resolvedValue, propertyName, definedMetadatas, metadatas, validationErrors);\n }));\n } else {\n this.performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors);\n }\n });\n }\n\n whitelist(object: any,\n groupedMetadatas: { [propertyName: string]: ValidationMetadata[] },\n validationErrors: ValidationError[]) {\n let notAllowedProperties: string[] = [];\n\n Object.keys(object).forEach(propertyName => {\n // does this property have no metadata?\n if (!groupedMetadatas[propertyName] || groupedMetadatas[propertyName].length === 0)\n notAllowedProperties.push(propertyName);\n });\n\n if (notAllowedProperties.length > 0) {\n\n if (this.validatorOptions && this.validatorOptions.forbidNonWhitelisted) {\n\n // throw errors\n notAllowedProperties.forEach(property => {\n const validationError: ValidationError = this.generateValidationError(object, (object as any)[property], property);\n validationError.constraints = { [ValidationTypes.WHITELIST]: `property ${property} should not exist` };\n validationError.children = undefined;\n validationErrors.push(validationError);\n });\n\n } else {\n\n // strip non allowed properties\n notAllowedProperties.forEach(property => delete (object as any)[property]);\n\n }\n }\n }\n\n stripEmptyErrors(errors: ValidationError[]) {\n return errors.filter(error => {\n if (error.children) {\n error.children = this.stripEmptyErrors(error.children);\n }\n\n if (Object.keys(error.constraints).length === 0) {\n if (error.children.length === 0) {\n return false;\n } else {\n delete error.constraints;\n }\n }\n\n return true;\n });\n }\n\n // -------------------------------------------------------------------------\n // Private Methods\n // -------------------------------------------------------------------------\n\n private performValidations (object: any,\n value: any, propertyName: string,\n definedMetadatas: ValidationMetadata[],\n metadatas: ValidationMetadata[],\n validationErrors: ValidationError[]) {\n\n const customValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.CUSTOM_VALIDATION);\n const nestedValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.NESTED_VALIDATION);\n const conditionalValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.CONDITIONAL_VALIDATION);\n\n const validationError = this.generateValidationError(object, value, propertyName);\n validationErrors.push(validationError);\n\n const canValidate = this.conditionalValidations(object, value, conditionalValidationMetadatas);\n if (!canValidate) {\n return;\n }\n\n // handle IS_DEFINED validation type the special way - it should work no matter skipUndefinedProperties/skipMissingProperties is set or not\n this.customValidations(object, value, definedMetadatas, validationError);\n this.mapContexts(object, value, definedMetadatas, validationError);\n\n if (value === undefined && this.validatorOptions && this.validatorOptions.skipUndefinedProperties === true) {\n return;\n }\n\n if (value === null && this.validatorOptions && this.validatorOptions.skipNullProperties === true) {\n return;\n }\n\n if ((value === null || value === undefined) && this.validatorOptions && this.validatorOptions.skipMissingProperties === true) {\n return;\n }\n\n this.customValidations(object, value, customValidationMetadatas, validationError);\n this.nestedValidations(value, nestedValidationMetadatas, validationError.children);\n\n this.mapContexts(object, value, metadatas, validationError);\n this.mapContexts(object, value, customValidationMetadatas, validationError);\n }\n\n private generateValidationError(object: Object, value: any, propertyName: string) {\n const validationError = new ValidationError();\n\n if (!this.validatorOptions ||\n !this.validatorOptions.validationError ||\n this.validatorOptions.validationError.target === undefined ||\n this.validatorOptions.validationError.target === true)\n validationError.target = object;\n\n if (!this.validatorOptions ||\n !this.validatorOptions.validationError ||\n this.validatorOptions.validationError.value === undefined ||\n this.validatorOptions.validationError.value === true)\n validationError.value = value;\n\n validationError.property = propertyName;\n validationError.children = [];\n validationError.constraints = {};\n\n return validationError;\n }\n\n private conditionalValidations(object: Object,\n value: any,\n metadatas: ValidationMetadata[]) {\n return metadatas\n .map(metadata => metadata.constraints[0](object, value))\n .reduce((resultA, resultB) => resultA && resultB, true);\n }\n\n private customValidations(object: Object,\n value: any,\n metadatas: ValidationMetadata[],\n error: ValidationError) {\n\n metadatas.forEach(metadata => {\n this.metadataStorage\n .getTargetValidatorConstraints(metadata.constraintCls)\n .forEach(customConstraintMetadata => {\n if (customConstraintMetadata.async && this.ignoreAsyncValidations)\n return;\n\n const validationArguments: ValidationArguments = {\n targetName: object.constructor ? (object.constructor as any).name : undefined,\n property: metadata.propertyName,\n object: object,\n value: value,\n constraints: metadata.constraints\n };\n\n if (!metadata.each || !(value instanceof Array || value instanceof Set || value instanceof Map)) {\n const validatedValue = customConstraintMetadata.instance.validate(value, validationArguments);\n if (isPromise(validatedValue)) {\n const promise = validatedValue.then(isValid => {\n if (!isValid) {\n const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata);\n error.constraints[type] = message;\n if (metadata.context) {\n if (!error.contexts) {\n error.contexts = {};\n }\n error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context);\n }\n }\n });\n this.awaitingPromises.push(promise);\n } else {\n if (!validatedValue) {\n const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata);\n error.constraints[type] = message;\n }\n }\n\n return;\n }\n\n // convert set and map into array\n const arrayValue = convertToArray(value);\n // Validation needs to be applied to each array item\n const validatedSubValues = arrayValue.map((subValue: any) => customConstraintMetadata.instance.validate(subValue, validationArguments));\n const validationIsAsync = validatedSubValues\n .some((validatedSubValue: boolean | Promise) => isPromise(validatedSubValue));\n\n if (validationIsAsync) {\n // Wrap plain values (if any) in promises, so that all are async\n const asyncValidatedSubValues = validatedSubValues\n .map((validatedSubValue: boolean | Promise) => isPromise(validatedSubValue) ? validatedSubValue : Promise.resolve(validatedSubValue));\n const asyncValidationIsFinishedPromise = Promise.all(asyncValidatedSubValues)\n .then((flatValidatedValues: boolean[]) => {\n const validationResult = flatValidatedValues.every((isValid: boolean) => isValid);\n if (!validationResult) {\n const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata);\n error.constraints[type] = message;\n if (metadata.context) {\n if (!error.contexts) {\n error.contexts = {};\n }\n error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context);\n }\n }\n });\n\n this.awaitingPromises.push(asyncValidationIsFinishedPromise);\n\n return;\n }\n\n const validationResult = validatedSubValues.every((isValid: boolean) => isValid);\n if (!validationResult) {\n const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata);\n error.constraints[type] = message;\n }\n });\n });\n }\n\n private nestedValidations(value: any, metadatas: ValidationMetadata[], errors: ValidationError[]) {\n\n if (value === void 0) {\n return;\n }\n\n metadatas.forEach(metadata => {\n if (\n metadata.type !== ValidationTypes.NESTED_VALIDATION &&\n metadata.type !== ValidationTypes.PROMISE_VALIDATION\n ) {\n return;\n }\n\n if (value instanceof Array || value instanceof Set || value instanceof Map) {\n // Treats Set as an array - as index of Set value is value itself and it is common case to have Object as value\n const arrayLikeValue = value instanceof Set ? Array.from(value) : value;\n arrayLikeValue.forEach((subValue: any, index: any) => {\n this.performValidations(value, subValue, index.toString(), [], metadatas, errors);\n });\n\n } else if (value instanceof Object) {\n const targetSchema = typeof metadata.target === \"string\" ? metadata.target as string : metadata.target.name;\n this.execute(value, targetSchema, errors);\n\n } else {\n const error = new ValidationError();\n error.value = value;\n error.property = metadata.propertyName;\n error.target = metadata.target;\n const [type, message] = this.createValidationError(metadata.target, value, metadata);\n error.constraints = {\n [type]: message\n };\n errors.push(error);\n }\n });\n }\n\n private mapContexts(object: Object,\n value: any,\n metadatas: ValidationMetadata[],\n error: ValidationError) {\n\n return metadatas\n .forEach(metadata => {\n if (metadata.context) {\n let customConstraint;\n if (metadata.type === ValidationTypes.CUSTOM_VALIDATION) {\n const customConstraints = this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls);\n customConstraint = customConstraints[0];\n }\n\n const type = this.getConstraintType(metadata, customConstraint);\n\n if (error.constraints[type]) {\n if (!error.contexts) {\n error.contexts = {};\n }\n\n error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context);\n }\n }\n });\n }\n\n private createValidationError(object: Object,\n value: any,\n metadata: ValidationMetadata,\n customValidatorMetadata?: ConstraintMetadata): [string, string] {\n\n const targetName = object.constructor ? (object.constructor as any).name : undefined;\n const type = this.getConstraintType(metadata, customValidatorMetadata);\n const validationArguments: ValidationArguments = {\n targetName: targetName,\n property: metadata.propertyName,\n object: object,\n value: value,\n constraints: metadata.constraints\n };\n\n let message = metadata.message || \"\";\n if (!metadata.message &&\n (!this.validatorOptions || (this.validatorOptions && !this.validatorOptions.dismissDefaultMessages))) {\n if (customValidatorMetadata && customValidatorMetadata.instance.defaultMessage instanceof Function) {\n message = customValidatorMetadata.instance.defaultMessage(validationArguments);\n }\n }\n\n const messageString = ValidationUtils.replaceMessageSpecialTokens(message, validationArguments);\n return [type, messageString];\n }\n\n private getConstraintType(metadata: ValidationMetadata, customValidatorMetadata?: ConstraintMetadata): string {\n const type = customValidatorMetadata && customValidatorMetadata.name ? customValidatorMetadata.name : metadata.type;\n return type;\n }\n\n}\n","import {ValidationMetadata} from \"../metadata/ValidationMetadata\";\nimport {ValidationTypes} from \"./ValidationTypes\";\nimport {ValidationError} from \"./ValidationError\";\nimport {ValidatorOptions} from \"./ValidatorOptions\";\nimport {ValidationExecutor} from \"./ValidationExecutor\";\nimport {ValidationOptions} from \"../decorator/ValidationOptions\";\nimport * as validator from \"validator\";\n\n/**\n * Validator performs validation of the given object based on its metadata.\n */\nexport class Validator {\n\n // -------------------------------------------------------------------------\n // Private Properties\n // -------------------------------------------------------------------------\n\n\n /**\n * Performs validation of the given object based on decorators or validation schema.\n * Common method for `validateOrReject` and `validate` methods.\n */\n private coreValidate(objectOrSchemaName: Object|string, objectOrValidationOptions: Object|ValidationOptions, maybeValidatorOptions?: ValidatorOptions): Promise {\n const object = typeof objectOrSchemaName === \"string\" ? objectOrValidationOptions as Object : objectOrSchemaName as Object;\n const options = typeof objectOrSchemaName === \"string\" ? maybeValidatorOptions : objectOrValidationOptions as ValidationOptions;\n const schema = typeof objectOrSchemaName === \"string\" ? objectOrSchemaName as string : undefined;\n\n const executor = new ValidationExecutor(this, options);\n const validationErrors: ValidationError[] = [];\n executor.execute(object, schema, validationErrors);\n\n return Promise.all(executor.awaitingPromises).then(() => {\n return executor.stripEmptyErrors(validationErrors);\n });\n }\n\n // -------------------------------------------------------------------------\n // Public Methods\n // -------------------------------------------------------------------------\n\n /**\n * Performs validation of the given object based on decorators used in given object class.\n */\n validate(object: Object, options?: ValidatorOptions): Promise;\n\n /**\n * Performs validation of the given object based on validation schema.\n */\n validate(schemaName: string, object: Object, options?: ValidatorOptions): Promise;\n\n /**\n * Performs validation of the given object based on decorators or validation schema.\n */\n validate(objectOrSchemaName: Object|string, objectOrValidationOptions: Object|ValidationOptions, maybeValidatorOptions?: ValidatorOptions): Promise {\n return this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions);\n }\n\n /**\n * Performs validation of the given object based on decorators used in given object class and reject on error.\n */\n validateOrReject(object: Object, options?: ValidatorOptions): Promise;\n\n /**\n * Performs validation of the given object based on validation schema and reject on error.\n */\n validateOrReject(schemaName: string, object: Object, options?: ValidatorOptions): Promise;\n\n /**\n * Performs validation of the given object based on decorators or validation schema and reject on error.\n */\n async validateOrReject(objectOrSchemaName: Object|string, objectOrValidationOptions: Object|ValidationOptions, maybeValidatorOptions?: ValidatorOptions): Promise {\n const errors = await this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions);\n if (errors.length)\n return Promise.reject(errors);\n }\n\n /**\n * Performs validation of the given object based on decorators used in given object class.\n * NOTE: This method completely ignores all async validations.\n */\n validateSync(object: Object, options?: ValidatorOptions): ValidationError[];\n\n /**\n * Performs validation of the given object based on validation schema.\n */\n validateSync(schemaName: string, object: Object, options?: ValidatorOptions): ValidationError[];\n\n /**\n * Performs validation of the given object based on decorators or validation schema.\n */\n validateSync(objectOrSchemaName: Object|string, objectOrValidationOptions: Object|ValidationOptions, maybeValidatorOptions?: ValidatorOptions): ValidationError[] {\n const object = typeof objectOrSchemaName === \"string\" ? objectOrValidationOptions as Object : objectOrSchemaName as Object;\n const options = typeof objectOrSchemaName === \"string\" ? maybeValidatorOptions : objectOrValidationOptions as ValidationOptions;\n const schema = typeof objectOrSchemaName === \"string\" ? objectOrSchemaName as string : undefined;\n\n const executor = new ValidationExecutor(this, options);\n executor.ignoreAsyncValidations = true;\n const validationErrors: ValidationError[] = [];\n executor.execute(object, schema, validationErrors);\n return executor.stripEmptyErrors(validationErrors);\n }\n\n}\n","\n/**\n * Container options.\n */\nexport interface UseContainerOptions {\n\n /**\n * If set to true, then default container will be used in the case if given container haven't returned anything.\n */\n fallback?: boolean;\n\n /**\n * If set to true, then default container will be used in the case if given container thrown an exception.\n */\n fallbackOnErrors?: boolean;\n\n}\n\n/**\n * Container to be used by this library for inversion control. If container was not implicitly set then by default\n * container simply creates a new instance of the given class.\n */\nconst defaultContainer: { get(someClass: { new (...args: any[]): T }|Function): T } = new (class {\n private instances: { type: Function, object: any }[] = [];\n get(someClass: { new (...args: any[]): T }): T {\n let instance = this.instances.find(instance => instance.type === someClass);\n if (!instance) {\n instance = { type: someClass, object: new someClass() };\n this.instances.push(instance);\n }\n\n return instance.object;\n }\n})();\n\nlet userContainer: { get(someClass: { new (...args: any[]): T }|Function): T };\nlet userContainerOptions: UseContainerOptions;\n\n/**\n * Sets container to be used by this library.\n */\nexport function useContainer(iocContainer: { get(someClass: any): any }, options?: UseContainerOptions) {\n userContainer = iocContainer;\n userContainerOptions = options;\n}\n\n/**\n * Gets the IOC container used by this library.\n */\nexport function getFromContainer(someClass: { new (...args: any[]): T }|Function): T {\n if (userContainer) {\n try {\n const instance = userContainer.get(someClass);\n if (instance)\n return instance;\n\n if (!userContainerOptions || !userContainerOptions.fallback)\n return instance;\n\n } catch (error) {\n if (!userContainerOptions || !userContainerOptions.fallbackOnErrors)\n throw error;\n }\n }\n return defaultContainer.get(someClass);\n}\n","import {ValidatorConstraintInterface} from \"../validation/ValidatorConstraintInterface\";\nimport {getFromContainer} from \"../container\";\n\n/**\n * This metadata interface contains information for custom validators.\n */\nexport class ConstraintMetadata {\n\n // -------------------------------------------------------------------------\n // Properties\n // -------------------------------------------------------------------------\n\n /**\n * Target class which performs validation.\n */\n target: Function;\n\n /**\n * Custom validation's name, that will be used as validation error type.\n */\n name: string;\n\n /**\n * Indicates if this validation is asynchronous or not.\n */\n async: boolean;\n\n // -------------------------------------------------------------------------\n // Constructor\n // -------------------------------------------------------------------------\n\n constructor(target: Function, name?: string, async: boolean = false) {\n this.target = target;\n this.name = name;\n this.async = async;\n }\n\n // -------------------------------------------------------------------------\n // Accessors\n // -------------------------------------------------------------------------\n\n /**\n * Instance of the target custom validation class which performs validation.\n */\n get instance(): ValidatorConstraintInterface {\n return getFromContainer(this.target);\n }\n\n}\n","import {ConstraintMetadata} from \"./metadata/ConstraintMetadata\";\nimport {ValidatorConstraintInterface} from \"./validation/ValidatorConstraintInterface\";\nimport {ValidationMetadata} from \"./metadata/ValidationMetadata\";\nimport {ValidationMetadataArgs} from \"./metadata/ValidationMetadataArgs\";\nimport {ValidationTypes} from \"./validation/ValidationTypes\";\nimport {ValidationArguments} from \"./validation/ValidationArguments\";\nimport { getFromContainer } from \"./container\";\nimport { MetadataStorage, getMetadataStorage } from \"./metadata/MetadataStorage\";\nimport { ValidationOptions } from \"./decorator/ValidationOptions\";\n\nexport interface ValidationDecoratorOptions {\n\n /**\n * Target object to be validated.\n */\n target: Function;\n\n /**\n * Target object's property name to be validated.\n */\n propertyName: string;\n\n /**\n * Name of the validation that is being registered.\n */\n name?: string;\n\n /**\n * Indicates if this decorator will perform async validation.\n */\n async?: boolean;\n\n /**\n * Validator options.\n */\n options?: ValidationOptions;\n\n /**\n * Array of validation constraints.\n */\n constraints?: any[];\n\n /**\n * Validator that performs validation.\n */\n validator: ValidatorConstraintInterface|Function;\n}\n\n/**\n * Registers a custom validation decorator.\n */\nexport function registerDecorator(options: ValidationDecoratorOptions): void {\n\n let constraintCls: Function;\n if (options.validator instanceof Function) {\n constraintCls = options.validator as Function;\n const constraintClasses = getFromContainer(MetadataStorage).getTargetValidatorConstraints(options.validator);\n if (constraintClasses.length > 1) {\n throw `More than one implementation of ValidatorConstraintInterface found for validator on: ${options.target}:${options.propertyName}`;\n }\n } else {\n const validator = options.validator as ValidatorConstraintInterface;\n constraintCls = class CustomConstraint implements ValidatorConstraintInterface {\n validate(value: any, validationArguments?: ValidationArguments): Promise|boolean {\n return validator.validate(value, validationArguments);\n }\n\n defaultMessage(validationArguments?: ValidationArguments) {\n if (validator.defaultMessage) {\n return validator.defaultMessage(validationArguments);\n }\n\n return \"\";\n }\n };\n getMetadataStorage().addConstraintMetadata(new ConstraintMetadata(constraintCls, options.name, options.async));\n }\n\n const validationMetadataArgs: ValidationMetadataArgs = {\n type: options.name && ValidationTypes.isValid(options.name) ? options.name : ValidationTypes.CUSTOM_VALIDATION,\n target: options.target,\n propertyName: options.propertyName,\n validationOptions: options.options,\n constraintCls: constraintCls,\n constraints: options.constraints\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(validationMetadataArgs));\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { registerDecorator } from \"../../register-decorator\";\nimport { ValidationArguments } from \"../../validation/ValidationArguments\";\nimport { ValidatorConstraintInterface } from \"../../validation/ValidatorConstraintInterface\";\n\nexport interface ValidateByOptions {\n name: string;\n constraints?: any[];\n validator: ValidatorConstraintInterface | Function;\n async?: boolean;\n}\n\nexport function buildMessage(\n impl: (eachPrefix: string, args?: ValidationArguments) => string,\n validationOptions?: ValidationOptions)\n : (validationArguments?: ValidationArguments) => string {\n return (validationArguments?: ValidationArguments) => {\n const eachPrefix = validationOptions && validationOptions.each\n ? \"each value in \"\n : \"\";\n return impl(eachPrefix, validationArguments);\n };\n}\n\nexport function ValidateBy(options: ValidateByOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return function (object: Object, propertyName: string) {\n registerDecorator({\n name: options.name,\n target: object.constructor,\n propertyName: propertyName,\n options: validationOptions,\n constraints: options.constraints,\n validator: options.validator\n });\n };\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"./ValidateBy\";\nimport { ValidationTypes } from \"../../validation/ValidationTypes\";\n\n// isDefined is (yet) a special case\nexport const IS_DEFINED = ValidationTypes.IS_DEFINED;\n\n/**\n * Checks if value is defined (!== undefined, !== null).\n */\nexport function isDefined(value: any): boolean {\n return value !== undefined && value !== null;\n}\n\n/**\n * Checks if value is defined (!== undefined, !== null).\n */\nexport function IsDefined(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_DEFINED,\n validator: {\n validate: (value) => isDefined(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property should not be null or undefined\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"./ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_LATLONG = \"isLatLong\";\n\n/**\n * Checks if a value is string in format a \"latitude,longitude\".\n */\nexport function isLatLong(value: string): boolean {\n return typeof value === \"string\" && validator.isLatLong(value);\n}\n\n/**\n * Checks if a value is string in format a \"latitude,longitude\".\n */\nexport function IsLatLong(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_LATLONG,\n validator: {\n validate: (value, args) => isLatLong(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a latitude,longitude string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"./ValidateBy\";\nimport { isLatLong } from \"./IsLatLong\";\n\nexport const IS_LATITUDE = \"isLatitude\";\n\n/**\n * Checks if a given value is a latitude.\n */\nexport function isLatitude(value: string): boolean {\n return (typeof value === \"number\" || typeof value === \"string\") && isLatLong(`${value},0`);\n}\n\n/**\n * Checks if a given value is a latitude.\n */\nexport function IsLatitude(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_LATITUDE,\n validator: {\n validate: (value, args) => isLatitude(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a latitude string or number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"./ValidateBy\";\nimport { isLatLong } from \"./IsLatLong\";\n\nexport const IS_LONGITUDE = \"isLongitude\";\n\n/**\n * Checks if a given value is a longitude.\n */\nexport function isLongitude(value: string): boolean {\n return (typeof value === \"number\" || typeof value === \"string\") && isLatLong(`0,${value}`);\n}\n\n/**\n * Checks if a given value is a longitude.\n */\nexport function IsLongitude(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_LONGITUDE,\n validator: {\n validate: (value, args) => isLongitude(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a longitude string or number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const EQUALS = \"equals\";\n\n/**\n * Checks if value matches (\"===\") the comparison.\n */\nexport function equals(value: unknown, comparison: unknown): boolean {\n return value === comparison;\n}\n\n/**\n * Checks if value matches (\"===\") the comparison.\n */\nexport function Equals(comparison: any, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: EQUALS,\n constraints: [comparison],\n validator: {\n validate: (value, args) => equals(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be equal to $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const NOT_EQUALS = \"notEquals\";\n\n/**\n * Checks if value does not match (\"!==\") the comparison.\n */\nexport function notEquals(value: unknown, comparison: unknown): boolean {\n return value !== comparison;\n}\n\n/**\n * Checks if value does not match (\"!==\") the comparison.\n */\nexport function NotEquals(comparison: any, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: NOT_EQUALS,\n constraints: [comparison],\n validator: {\n validate: (value, args) => notEquals(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property should not be equal to $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_EMPTY = \"isEmpty\";\n\n/**\n * Checks if given value is empty (=== '', === null, === undefined).\n */\nexport function isEmpty(value: unknown): boolean {\n return value === \"\" || value === null || value === undefined;\n}\n\n/**\n * Checks if given value is empty (=== '', === null, === undefined).\n */\nexport function IsEmpty(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_EMPTY,\n validator: {\n validate: (value, args) => isEmpty(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be empty\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_NOT_EMPTY = \"isNotEmpty\";\n\n/**\n * Checks if given value is not empty (!== '', !== null, !== undefined).\n */\nexport function isNotEmpty(value: unknown): boolean {\n return value !== \"\" && value !== null && value !== undefined;\n}\n\n/**\n * Checks if given value is not empty (!== '', !== null, !== undefined).\n */\nexport function IsNotEmpty(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_NOT_EMPTY,\n validator: {\n validate: (value, args) => isNotEmpty(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property should not be empty\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_IN = \"isIn\";\n\n/**\n * Checks if given value is in a array of allowed values.\n */\nexport function isIn(value: unknown, possibleValues: unknown[]): boolean {\n return !(possibleValues instanceof Array) || possibleValues.some(possibleValue => possibleValue === value);\n}\n\n/**\n * Checks if given value is in a array of allowed values.\n */\nexport function IsIn(values: any[], validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_IN,\n constraints: [values],\n validator: {\n validate: (value, args) => isIn(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be one of the following values: $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_NOT_IN = \"isNotIn\";\n\n/**\n * Checks if given value not in a array of allowed values.\n */\nexport function isNotIn(value: unknown, possibleValues: unknown[]): boolean {\n return !(possibleValues instanceof Array) || !possibleValues.some(possibleValue => possibleValue === value);\n}\n\n/**\n * Checks if given value not in a array of allowed values.\n */\nexport function IsNotIn(values: any[], validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_NOT_IN,\n constraints: [values],\n validator: {\n validate: (value, args) => isNotIn(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property should not be one of the following values: $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_DIVISIBLE_BY = \"isDivisibleBy\";\n\n/**\n * Checks if value is a number that's divisible by another.\n */\nexport function isDivisibleBy(value: unknown, num: number): boolean {\n return typeof value === \"number\" &&\n typeof num === \"number\" &&\n validator.isDivisibleBy(String(value), num);\n}\n\n/**\n * Checks if value is a number that's divisible by another.\n */\nexport function IsDivisibleBy(num: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_DIVISIBLE_BY,\n constraints: [num],\n validator: {\n validate: (value, args) => isDivisibleBy(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be divisible by $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_POSITIVE = \"isPositive\";\n\n/**\n * Checks if the value is a positive number greater than zero.\n */\nexport function isPositive(value: unknown): boolean {\n return typeof value === \"number\" && value > 0;\n}\n\n/**\n * Checks if the value is a positive number greater than zero.\n */\nexport function IsPositive(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_POSITIVE,\n validator: {\n validate: (value, args) => isPositive(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a positive number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_NEGATIVE = \"isNegative\";\n\n/**\n * Checks if the value is a negative number smaller than zero.\n */\nexport function isNegative(value: unknown): boolean {\n return typeof value === \"number\" && value < 0;\n}\n\n/**\n * Checks if the value is a negative number smaller than zero.\n */\nexport function IsNegative(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_NEGATIVE,\n validator: {\n validate: (value, args) => isNegative(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a negative number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const MAX = \"max\";\n\n/**\n * Checks if the first number is less than or equal to the second.\n */\nexport function max(num: unknown, max: number): boolean {\n return typeof num === \"number\" && typeof max === \"number\" && num <= max;\n}\n\n/**\n * Checks if the first number is less than or equal to the second.\n */\nexport function Max(maxValue: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: MAX,\n constraints: [maxValue],\n validator: {\n validate: (value, args) => max(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must not be greater than $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const MIN = \"min\";\n\n/**\n * Checks if the first number is greater than or equal to the second.\n */\nexport function min(num: unknown, min: number): boolean {\n return typeof num === \"number\" && typeof min === \"number\" && num >= min;\n}\n\n/**\n * Checks if the first number is greater than or equal to the second.\n */\nexport function Min(minValue: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: MIN,\n constraints: [minValue],\n validator: {\n validate: (value, args) => min(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must not be less than $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const MIN_DATE = \"minDate\";\n\n/**\n * Checks if the value is a date that's after the specified date.\n */\nexport function minDate(date: unknown, minDate: Date): boolean {\n return date instanceof Date && date.getTime() >= minDate.getTime();\n}\n\n/**\n * Checks if the value is a date that's after the specified date.\n */\nexport function MinDate(date: Date, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: MIN_DATE,\n constraints: [date],\n validator: {\n validate: (value, args) => minDate(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => \"minimal allowed date for \" + eachPrefix + \"$property is $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const MAX_DATE = \"maxDate\";\n\n /**\n * Checks if the value is a date that's before the specified date.\n */\nexport function maxDate(date: unknown, maxDate: Date): boolean {\n return date instanceof Date && date.getTime() <= maxDate.getTime();\n}\n\n/**\n * Checks if the value is a date that's after the specified date.\n */\nexport function MaxDate(date: Date, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: MAX_DATE,\n constraints: [date],\n validator: {\n validate: (value, args) => maxDate(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => \"maximal allowed date for \" + eachPrefix + \"$property is $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const CONTAINS = \"contains\";\n\n/**\n * Checks if the string contains the seed.\n * If given value is not a string, then it returns false.\n */\nexport function contains(value: unknown, seed: string): boolean {\n return typeof value === \"string\" && validator.contains(value, seed);\n}\n\n/**\n * Checks if the string contains the seed.\n * If given value is not a string, then it returns false.\n */\nexport function Contains(seed: string, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: CONTAINS,\n constraints: [seed],\n validator: {\n validate: (value, args) => contains(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain a $constraint1 string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const NOT_CONTAINS = \"notContains\";\n\n/**\n * Checks if the string does not contain the seed.\n * If given value is not a string, then it returns false.\n */\nexport function notContains(value: unknown, seed: string): boolean {\n return typeof value === \"string\" && !validator.contains(value, seed);\n}\n\n/**\n * Checks if the string does not contain the seed.\n * If given value is not a string, then it returns false.\n */\nexport function NotContains(seed: string, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: NOT_CONTAINS,\n constraints: [seed],\n validator: {\n validate: (value, args) => notContains(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property should not contain a $constraint1 string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_ALPHA = \"isAlpha\";\n\n/**\n * Checks if the string contains only letters (a-zA-Z).\n * If given value is not a string, then it returns false.\n */\nexport function isAlpha(value: unknown, locale?: ValidatorJS.AlphaLocale): boolean {\n return typeof value === \"string\" && ValidatorJS.isAlpha(value, locale);\n}\n\n/**\n * Checks if the string contains only letters (a-zA-Z).\n * If given value is not a string, then it returns false.\n */\nexport function IsAlpha(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ALPHA,\n constraints: [locale],\n validator: {\n validate: (value, args) => isAlpha(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain only letters (a-zA-Z)\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_ALPHANUMERIC = \"isAlphanumeric\";\n\n/**\n * Checks if the string contains only letters and numbers.\n * If given value is not a string, then it returns false.\n */\nexport function isAlphanumeric(value: unknown, locale?: ValidatorJS.AlphanumericLocale): boolean {\n return typeof value === \"string\" && ValidatorJS.isAlphanumeric(value, locale);\n}\n\n/**\n * Checks if the string contains only letters and numbers.\n * If given value is not a string, then it returns false.\n */\nexport function IsAlphanumeric(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ALPHANUMERIC,\n constraints: [locale],\n validator: {\n validate: (value, args) => isAlphanumeric(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain only letters and numbers\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_DECIMAL = \"isDecimal\";\n\n/**\n * Checks if the string is a valid decimal.\n * If given value is not a string, then it returns false.\n */\nexport function isDecimal(value: unknown, options?: ValidatorJS.IsDecimalOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isDecimal(value, options);\n}\n\n/**\n * Checks if the string contains only letters and numbers.\n * If given value is not a string, then it returns false.\n */\nexport function IsDecimal(options?: ValidatorJS.IsDecimalOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_DECIMAL,\n constraints: [options],\n validator: {\n validate: (value, args) => isDecimal(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property is not a valid decimal number.\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_ASCII = \"isAscii\";\n\n/**\n * Checks if the string contains ASCII chars only.\n * If given value is not a string, then it returns false.\n */\nexport function isAscii(value: unknown): boolean {\n return typeof value === \"string\" && validator.isAscii(value);\n}\n\n/**\n * Checks if the string contains ASCII chars only.\n * If given value is not a string, then it returns false.\n */\nexport function IsAscii(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ASCII,\n validator: {\n validate: (value, args) => isAscii(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain only ASCII characters\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_BASE64 = \"isBase64\";\n\n/**\n * Checks if a string is base64 encoded.\n * If given value is not a string, then it returns false.\n */\nexport function isBase64(value: unknown): boolean {\n return typeof value === \"string\" && validator.isBase64(value);\n}\n\n/**\n * Checks if a string is base64 encoded.\n * If given value is not a string, then it returns false.\n */\nexport function IsBase64(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_BASE64,\n validator: {\n validate: (value, args) => isBase64(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be base64 encoded\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_BYTE_LENGTH = \"isByteLength\";\n\n/**\n * Checks if the string's length (in bytes) falls in a range.\n * If given value is not a string, then it returns false.\n */\nexport function isByteLength(value: unknown, min: number, max?: number): boolean {\n return typeof value === \"string\" && validator.isByteLength(value, { min, max });\n}\n\n/**\n * Checks if the string's length (in bytes) falls in a range.\n * If given value is not a string, then it returns false.\n */\nexport function IsByteLength(min: number, max?: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_BYTE_LENGTH,\n constraints: [min, max],\n validator: {\n validate: (value, args) => isByteLength(value, args.constraints[0], args.constraints[1]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property's byte length must fall into ($constraint1, $constraint2) range\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_CREDIT_CARD = \"isCreditCard\";\n\n/**\n * Checks if the string is a credit card.\n * If given value is not a string, then it returns false.\n */\nexport function isCreditCard(value: unknown): boolean {\n return typeof value === \"string\" && validator.isCreditCard(value);\n}\n\n/**\n * Checks if the string is a credit card.\n * If given value is not a string, then it returns false.\n */\nexport function IsCreditCard(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_CREDIT_CARD,\n validator: {\n validate: (value, args) => isCreditCard(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a credit card\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_CURRENCY = \"isCurrency\";\n\n/**\n * Checks if the string is a valid currency amount.\n * If given value is not a string, then it returns false.\n */\nexport function isCurrency(value: unknown, options?: ValidatorJS.IsCurrencyOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isCurrency(value, options);\n}\n\n/**\n * Checks if the string is a valid currency amount.\n * If given value is not a string, then it returns false.\n */\nexport function IsCurrency(options?: ValidatorJS.IsCurrencyOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_CURRENCY,\n constraints: [options],\n validator: {\n validate: (value, args) => isCurrency(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a currency\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_EMAIL = \"isEmail\";\n\n/**\n * Checks if the string is an email.\n * If given value is not a string, then it returns false.\n */\nexport function isEmail(value: unknown, options?: ValidatorJS.IsEmailOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isEmail(value, options);\n}\n\n/**\n * Checks if the string is an email.\n * If given value is not a string, then it returns false.\n */\nexport function IsEmail(options?: ValidatorJS.IsEmailOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_EMAIL,\n constraints: [options],\n validator: {\n validate: (value, args) => isEmail(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an email\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_FQDN = \"isFqdn\";\n\n/**\n * Checks if the string is a fully qualified domain name (e.g. domain.com).\n * If given value is not a string, then it returns false.\n */\nexport function isFQDN(value: unknown, options?: ValidatorJS.IsFQDNOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isFQDN(value, options);\n}\n\n/**\n * Checks if the string is a fully qualified domain name (e.g. domain.com).\n * If given value is not a string, then it returns false.\n */\nexport function IsFQDN(options?: ValidatorJS.IsFQDNOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_FQDN,\n constraints: [options],\n validator: {\n validate: (value, args) => isFQDN(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a valid domain name\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_FULL_WIDTH = \"isFullWidth\";\n\n/**\n * Checks if the string contains any full-width chars.\n * If given value is not a string, then it returns false.\n */\nexport function isFullWidth(value: unknown): boolean {\n return typeof value === \"string\" && validator.isFullWidth(value);\n}\n\n/**\n * Checks if the string contains any full-width chars.\n * If given value is not a string, then it returns false.\n */\nexport function IsFullWidth(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_FULL_WIDTH,\n validator: {\n validate: (value, args) => isFullWidth(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain a full-width characters\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_HALF_WIDTH = \"isHalfWidth\";\n\n/**\n * Checks if the string contains any half-width chars.\n * If given value is not a string, then it returns false.\n */\nexport function isHalfWidth(value: unknown): boolean {\n return typeof value === \"string\" && validator.isHalfWidth(value);\n}\n\n/**\n * Checks if the string contains any full-width chars.\n * If given value is not a string, then it returns false.\n */\nexport function IsHalfWidth(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_HALF_WIDTH,\n validator: {\n validate: (value, args) => isHalfWidth(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain a half-width characters\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_VARIABLE_WIDTH = \"isVariableWidth\";\n\n/**\n * Checks if the string contains variable-width chars.\n * If given value is not a string, then it returns false.\n */\nexport function isVariableWidth(value: unknown): boolean {\n return typeof value === \"string\" && validator.isVariableWidth(value);\n}\n\n/**\n * Checks if the string contains variable-width chars.\n * If given value is not a string, then it returns false.\n */\nexport function IsVariableWidth(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_VARIABLE_WIDTH,\n validator: {\n validate: (value, args) => isVariableWidth(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain a full-width and half-width characters\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_HEX_COLOR = \"isHexColor\";\n\n/**\n * Checks if the string is a hexadecimal color.\n * If given value is not a string, then it returns false.\n */\nexport function isHexColor(value: unknown): boolean {\n return typeof value === \"string\" && validator.isHexColor(value);\n}\n\n/**\n * Checks if the string is a hexadecimal color.\n * If given value is not a string, then it returns false.\n */\nexport function IsHexColor(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_HEX_COLOR,\n validator: {\n validate: (value, args) => isHexColor(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a hexadecimal color\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_HEXADECIMAL = \"isHexadecimal\";\n\n/**\n * Checks if the string is a hexadecimal number.\n * If given value is not a string, then it returns false.\n */\nexport function isHexadecimal(value: unknown): boolean {\n return typeof value === \"string\" && validator.isHexadecimal(value);\n}\n\n/**\n * Checks if the string is a hexadecimal number.\n * If given value is not a string, then it returns false.\n */\nexport function IsHexadecimal(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_HEXADECIMAL,\n validator: {\n validate: (value, args) => isHexadecimal(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a hexadecimal number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationArguments } from \"../validation/ValidationArguments\";\n\n/**\n * Options used to pass to validation decorators.\n */\nexport interface ValidationOptions {\n\n /**\n * Specifies if validated value is an array and each of its items must be validated.\n */\n each?: boolean;\n\n /**\n * Error message to be used on validation fail.\n * Message can be either string or a function that returns a string.\n */\n message?: string | ((validationArguments: ValidationArguments) => string);\n\n /**\n * Validation groups used for this validation.\n */\n groups?: string[];\n\n /**\n * Indicates if validation must be performed always, no matter of validation groups used.\n */\n always?: boolean;\n\n /*\n * A transient set of data passed through to the validation result for response mapping\n */\n context?: any;\n}\n\n\nexport function isValidationOptions(val: any): val is ValidationOptions {\n if (!val) {\n return false;\n }\n return \"each\" in val\n || \"message\" in val\n || \"groups\" in val\n || \"always\" in val\n || \"context\" in val;\n}\n","import { ValidationOptions, isValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_MAC_ADDRESS = \"isMacAddress\";\n\n/**\n * Check if the string is a MAC address.\n * If given value is not a string, then it returns false.\n */\nexport function isMACAddress(value: unknown, options?: ValidatorJS.IsMACAddressOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isMACAddress(value, options);\n}\n\n/**\n * Check if the string is a MAC address.\n * If given value is not a string, then it returns false.\n */\nexport function IsMACAddress(optionsArg?: ValidatorJS.IsMACAddressOptions, validationOptionsArg?: ValidationOptions): PropertyDecorator;\nexport function IsMACAddress(validationOptionsArg?: ValidationOptions): PropertyDecorator;\nexport function IsMACAddress(optionsOrValidationOptionsArg?: ValidatorJS.IsMACAddressOptions | ValidationOptions, validationOptionsArg?: ValidationOptions): PropertyDecorator {\n const options = !isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : undefined;\n const validationOptions = isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : validationOptionsArg;\n\n return ValidateBy(\n {\n name: IS_MAC_ADDRESS,\n constraints: [options],\n validator: {\n validate: (value, args) => isMACAddress(value, options),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a MAC Address\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport type IsIpVersion = \"4\" | \"6\" | 4 | 6;\n\nexport const IS_IP = \"isIp\";\n\n/**\n * Checks if the string is an IP (version 4 or 6).\n * If given value is not a string, then it returns false.\n */\nexport function isIP(value: unknown, version?: IsIpVersion): boolean {\n const versionStr = version ? (`${version}` as \"4\" | \"6\") : undefined;\n return typeof value === \"string\" && ValidatorJS.isIP(value, versionStr);\n}\n\n/**\n * Checks if the string is an IP (version 4 or 6).\n * If given value is not a string, then it returns false.\n */\nexport function IsIP(version?: IsIpVersion, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_IP,\n constraints: [version],\n validator: {\n validate: (value, args) => isIP(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an ip address\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_PORT = \"isPort\";\n\n/**\n * Check if the string is a valid port number.\n */\nexport function isPort(value: unknown): boolean {\n return typeof value === \"string\" && validator.isPort(value);\n}\n\n/**\n * Check if the string is a valid port number.\n */\nexport function IsPort(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_PORT,\n validator: {\n validate: (value, args) => isPort(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a port\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport type IsISBNVersion = \"10\" | \"13\" | 10 | 13;\n\nexport const IS_ISBN = \"isIsbn\";\n\n/**\n * Checks if the string is an ISBN (version 10 or 13).\n * If given value is not a string, then it returns false.\n */\nexport function isISBN(value: unknown, version?: IsISBNVersion): boolean {\n const versionStr = version ? (`${version}` as \"10\" | \"13\") : undefined;\n return typeof value === \"string\" && ValidatorJS.isISBN(value, versionStr);\n}\n\n/**\n * Checks if the string is an ISBN (version 10 or 13).\n * If given value is not a string, then it returns false.\n */\nexport function IsISBN(version?: IsISBNVersion, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ISBN,\n constraints: [version],\n validator: {\n validate: (value, args) => isISBN(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an ISBN\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_ISIN = \"isIsin\";\n\n/**\n * Checks if the string is an ISIN (stock/security identifier).\n * If given value is not a string, then it returns false.\n */\nexport function isISIN(value: unknown): boolean {\n return typeof value === \"string\" && validator.isISIN(value);\n}\n\n/**\n * Checks if the string is an ISIN (stock/security identifier).\n * If given value is not a string, then it returns false.\n */\nexport function IsISIN(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ISIN,\n validator: {\n validate: (value, args) => isISIN(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an ISIN (stock/security identifier)\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_ISO8601 = \"isIso8601\";\n\n/**\n * Checks if the string is a valid ISO 8601 date.\n * If given value is not a string, then it returns false.\n * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.\n */\nexport function isISO8601(value: unknown, options?: ValidatorJS.IsISO8601Options): boolean {\n return typeof value === \"string\" && ValidatorJS.isISO8601(value, options);\n}\n\n/**\n * Checks if the string is a valid ISO 8601 date.\n * If given value is not a string, then it returns false.\n * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29.\n */\nexport function IsISO8601(options?: ValidatorJS.IsISO8601Options, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ISO8601,\n constraints: [options],\n validator: {\n validate: (value, args) => isISO8601(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a valid ISO 8601 date string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_JSON = \"isJson\";\n\n/**\n * Checks if the string is valid JSON (note: uses JSON.parse).\n * If given value is not a string, then it returns false.\n */\nexport function isJSON(value: unknown): boolean {\n return typeof value === \"string\" && validator.isJSON(value);\n}\n\n/**\n * Checks if the string is valid JSON (note: uses JSON.parse).\n * If given value is not a string, then it returns false.\n */\nexport function IsJSON(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_JSON,\n validator: {\n validate: (value, args) => isJSON(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a json string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_JWT = \"isJwt\";\n\n/**\n * Checks if the string is valid JWT token.\n * If given value is not a string, then it returns false.\n */\nexport function isJWT(value: unknown): boolean {\n return typeof value === \"string\" && validator.isJWT(value);\n}\n\n/**\n * Checks if the string is valid JWT token.\n * If given value is not a string, then it returns false.\n */\nexport function IsJWT(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_JWT,\n validator: {\n validate: (value, args) => isJWT(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a jwt string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_LOWERCASE = \"isLowercase\";\n\n/**\n * Checks if the string is lowercase.\n * If given value is not a string, then it returns false.\n */\nexport function isLowercase(value: unknown): boolean {\n return typeof value === \"string\" && validator.isLowercase(value);\n}\n\n/**\n * Checks if the string is lowercase.\n * If given value is not a string, then it returns false.\n */\nexport function IsLowercase(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_LOWERCASE,\n validator: {\n validate: (value, args) => isLowercase(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a lowercase string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_MOBILE_PHONE = \"isMobilePhone\";\n\n/**\n * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS'])\n * OR one of ['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', ar-JO', 'ar-KW', 'ar-SA', 'ar-SY', 'ar-TN', 'be-BY',\n * 'bg-BG', 'bn-BD', 'cs-CZ', 'da-DK', 'de-DE', 'de-AT', 'el-GR', 'en-AU', 'en-CA', 'en-GB', 'en-GG', 'en-GH', 'en-HK',\n * 'en-MO', 'en-IE', 'en-IN', 'en-KE', 'en-MT', 'en-MU', 'en-NG', 'en-NZ', 'en-PK', 'en-RW', 'en-SG', 'en-SL', 'en-UG',\n * 'en-US', 'en-TZ', 'en-ZA', 'en-ZM', 'es-CL', 'es-CR', 'es-EC', 'es-ES', 'es-MX', 'es-PA', 'es-PY', 'es-UY', 'et-EE',\n * 'fa-IR', 'fi-FI', 'fj-FJ', 'fo-FO', 'fr-BE', 'fr-FR', 'fr-GF', 'fr-GP', 'fr-MQ', 'fr-RE', 'he-IL', 'hu-HU', 'id-ID',\n * 'it-IT', 'ja-JP', 'kk-KZ', 'kl-GL', 'ko-KR', 'lt-LT', 'ms-MY', 'nb-NO', 'ne-NP', 'nl-BE', 'nl-NL', 'nn-NO', 'pl-PL',\n * 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN',\n * 'zh-HK', 'zh-MO', 'zh-TW']\n * If given value is not a string, then it returns false.\n */\nexport function isMobilePhone(value: unknown, locale?: validator.MobilePhoneLocale, options?: validator.IsMobilePhoneOptions): boolean {\n return typeof value === \"string\" && validator.isMobilePhone(value, locale, options);\n}\n\n/**\n * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS'])\n * OR one of ['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', ar-JO', 'ar-KW', 'ar-SA', 'ar-SY', 'ar-TN', 'be-BY',\n * 'bg-BG', 'bn-BD', 'cs-CZ', 'da-DK', 'de-DE', 'de-AT', 'el-GR', 'en-AU', 'en-CA', 'en-GB', 'en-GG', 'en-GH', 'en-HK',\n * 'en-MO', 'en-IE', 'en-IN', 'en-KE', 'en-MT', 'en-MU', 'en-NG', 'en-NZ', 'en-PK', 'en-RW', 'en-SG', 'en-SL', 'en-UG',\n * 'en-US', 'en-TZ', 'en-ZA', 'en-ZM', 'es-CL', 'es-CR', 'es-EC', 'es-ES', 'es-MX', 'es-PA', 'es-PY', 'es-UY', 'et-EE',\n * 'fa-IR', 'fi-FI', 'fj-FJ', 'fo-FO', 'fr-BE', 'fr-FR', 'fr-GF', 'fr-GP', 'fr-MQ', 'fr-RE', 'he-IL', 'hu-HU', 'id-ID',\n * 'it-IT', 'ja-JP', 'kk-KZ', 'kl-GL', 'ko-KR', 'lt-LT', 'ms-MY', 'nb-NO', 'ne-NP', 'nl-BE', 'nl-NL', 'nn-NO', 'pl-PL',\n * 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sl-SI', 'sk-SK', 'sr-RS', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN',\n * 'zh-HK', 'zh-MO', 'zh-TW']\n * If given value is not a string, then it returns false.\n */\nexport function IsMobilePhone(locale?: validator.MobilePhoneLocale, options?: validator.IsMobilePhoneOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_MOBILE_PHONE,\n constraints: [locale, options],\n validator: {\n validate: (value, args) => isMobilePhone(value, args.constraints[0], args.constraints[1]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a phone number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_ISO31661_ALPHA_2 = \"isISO31661Alpha2\";\n\n/**\n * Check if the string is a valid [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) officially assigned country code.\n */\nexport function isISO31661Alpha2(value: unknown): boolean {\n return typeof value === \"string\" && validator.isISO31661Alpha2(value);\n}\n\n/**\n * Check if the string is a valid [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) officially assigned country code.\n */\nexport function IsISO31661Alpha2(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ISO31661_ALPHA_2,\n validator: {\n validate: (value, args) => isISO31661Alpha2(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a valid ISO31661 Alpha2 code\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_ISO31661_ALPHA_3 = \"isISO31661Alpha3\";\n\n/**\n * Check if the string is a valid [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) officially assigned country code.\n */\nexport function isISO31661Alpha3(value: unknown): boolean {\n return typeof value === \"string\" && validator.isISO31661Alpha3(value);\n}\n\n/**\n * Check if the string is a valid [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) officially assigned country code.\n */\nexport function IsISO31661Alpha3(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ISO31661_ALPHA_3,\n validator: {\n validate: (value, args) => isISO31661Alpha3(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a valid ISO31661 Alpha3 code\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_MONGO_ID = \"isMongoId\";\n\n/**\n * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId.\n * If given value is not a string, then it returns false.\n */\nexport function isMongoId(value: unknown): boolean {\n return typeof value === \"string\" && validator.isMongoId(value);\n}\n\n/**\n * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId.\n * If given value is not a string, then it returns false.\n */\nexport function IsMongoId(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_MONGO_ID,\n validator: {\n validate: (value, args) => isMongoId(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a mongodb id\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_MULTIBYTE = \"isMultibyte\";\n\n/**\n * Checks if the string contains one or more multibyte chars.\n * If given value is not a string, then it returns false.\n */\nexport function isMultibyte(value: unknown): boolean {\n return typeof value === \"string\" && validator.isMultibyte(value);\n}\n\n/**\n * Checks if the string contains one or more multibyte chars.\n * If given value is not a string, then it returns false.\n */\nexport function IsMultibyte(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_MULTIBYTE,\n validator: {\n validate: (value, args) => isMultibyte(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain one or more multibyte chars\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_SURROGATE_PAIR = \"isSurrogatePair\";\n\n/**\n * Checks if the string contains any surrogate pairs chars.\n * If given value is not a string, then it returns false.\n */\nexport function isSurrogatePair(value: unknown): boolean {\n return typeof value === \"string\" && validator.isSurrogatePair(value);\n}\n\n/**\n * Checks if the string contains any surrogate pairs chars.\n * If given value is not a string, then it returns false.\n */\nexport function IsSurrogatePair(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_SURROGATE_PAIR,\n validator: {\n validate: (value, args) => isSurrogatePair(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain any surrogate pairs chars\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_URL = \"isUrl\";\n\n/**\n * Checks if the string is an url.\n * If given value is not a string, then it returns false.\n */\nexport function isURL(value: string, options?: ValidatorJS.IsURLOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isURL(value, options);\n}\n\n/**\n * Checks if the string is an url.\n * If given value is not a string, then it returns false.\n */\nexport function IsUrl(options?: ValidatorJS.IsURLOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_URL,\n constraints: [options],\n validator: {\n validate: (value, args) => isURL(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an URL address\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport type UUIDVersion = \"3\" | \"4\" | \"5\" | \"all\" | 3 | 4 | 5;\n\nexport const IS_UUID = \"isUuid\";\n\n/**\n * Checks if the string is a UUID (version 3, 4 or 5).\n * If given value is not a string, then it returns false.\n */\nexport function isUUID(value: unknown, version?: UUIDVersion): boolean {\n return typeof value === \"string\" && validator.isUUID(value, version);\n}\n\n/**\n * Checks if the string is a UUID (version 3, 4 or 5).\n * If given value is not a string, then it returns false.\n */\nexport function IsUUID(version?: UUIDVersion, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_UUID,\n constraints: [version],\n validator: {\n validate: (value, args) => isUUID(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an UUID\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_FIREBASE_PUSH_ID = \"IsFirebasePushId\";\n\n/**\n * Checks if the string is a Firebase Push Id\n * If given value is not a Firebase Push Id, it returns false\n */\nexport function isFirebasePushId(value: unknown): boolean {\n const webSafeRegex = /^[a-zA-Z0-9_-]*$/;\n return typeof value === \"string\" && value.length === 20 && webSafeRegex.test(value);\n}\n\n/**\n * Checks if the string is a Firebase Push Id\n * If given value is not a Firebase Push Id, it returns false\n */\nexport function IsFirebasePushId(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_FIREBASE_PUSH_ID,\n validator: {\n validate: (value, args) => isFirebasePushId(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a Firebase Push Id\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_UPPERCASE = \"isUppercase\";\n\n/**\n * Checks if the string is uppercase.\n * If given value is not a string, then it returns false.\n */\nexport function isUppercase(value: unknown): boolean {\n return typeof value === \"string\" && validator.isUppercase(value);\n}\n\n/**\n * Checks if the string is uppercase.\n * If given value is not a string, then it returns false.\n */\nexport function IsUppercase(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_UPPERCASE,\n validator: {\n validate: (value, args) => isUppercase(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be uppercase\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const LENGTH = \"length\";\n\n/**\n * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function length(value: unknown, min: number, max?: number): boolean {\n return typeof value === \"string\" && validator.isLength(value, { min, max });\n}\n\n/**\n * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function Length(min: number, max?: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: LENGTH,\n constraints: [min, max],\n validator: {\n validate: (value, args) => length(value, args.constraints[0], args.constraints[1]),\n defaultMessage: buildMessage(\n (eachPrefix, args) => {\n const isMinLength = args.constraints[0] !== null && args.constraints[0] !== undefined;\n const isMaxLength = args.constraints[1] !== null && args.constraints[1] !== undefined;\n if (isMinLength && (!args.value || args.value.length < args.constraints[0])) {\n return eachPrefix + \"$property must be longer than or equal to $constraint1 characters\";\n } else if (isMaxLength && (args.value.length > args.constraints[1])) {\n return eachPrefix + \"$property must be shorter than or equal to $constraint2 characters\";\n }\n return eachPrefix + \"$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters\";\n },\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const MAX_LENGTH = \"maxLength\";\n\n/**\n * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function maxLength(value: unknown, max: number) {\n return typeof value === \"string\" && validator.isLength(value, { min: 0, max });\n}\n\n/**\n * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function MaxLength(max: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: MAX_LENGTH,\n constraints: [max],\n validator: {\n validate: (value, args) => maxLength(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be shorter than or equal to $constraint1 characters\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const MIN_LENGTH = \"minLength\";\n\n/**\n * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function minLength(value: unknown, min: number) {\n return typeof value === \"string\" && validator.isLength(value, { min });\n}\n\n/**\n * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs.\n * If given value is not a string, then it returns false.\n */\nexport function MinLength(min: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: MIN_LENGTH,\n constraints: [min],\n validator: {\n validate: (value, args) => minLength(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be longer than or equal to $constraint1 characters\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const MATCHES = \"matches\";\n\n/**\n * Checks if string matches the pattern. Either matches('foo', /foo/i).\n * If given value is not a string, then it returns false.\n */\nexport function matches(value: string, pattern: RegExp): boolean;\nexport function matches(value: string, pattern: string, modifiers: string): boolean;\nexport function matches(value: string, pattern: RegExp | string, modifiers?: string): boolean {\n return typeof value === \"string\" && validator.matches(value, pattern as unknown as any, modifiers);\n}\n\n/**\n * Checks if string matches the pattern. Either matches('foo', /foo/i)\n * If given value is not a string, then it returns false.\n */\nexport function Matches(pattern: RegExp, validationOptions?: ValidationOptions): PropertyDecorator;\nexport function Matches(pattern: string, modifiers?: string, validationOptions?: ValidationOptions): PropertyDecorator;\nexport function Matches(pattern: RegExp | string, modifiersOrAnnotationOptions?: string | ValidationOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n let modifiers: string;\n if (modifiersOrAnnotationOptions && modifiersOrAnnotationOptions instanceof Object && !validationOptions) {\n validationOptions = modifiersOrAnnotationOptions as ValidationOptions;\n } else {\n modifiers = modifiersOrAnnotationOptions as string;\n }\n\n return ValidateBy(\n {\n name: MATCHES,\n constraints: [pattern, modifiers],\n validator: {\n validate: (value, args) => matches(value, args.constraints[0], args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix, args) => eachPrefix + \"$property must match $constraint1 regular expression\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport { PhoneNumberUtil } from \"google-libphonenumber\";\n\nexport const IS_PHONE_NUMBER = \"isPhoneNumber\";\n\n/**\n * Checks if the string is a valid phone number.\n * @param value the potential phone number string to test\n * @param {string} region 2 characters uppercase country code (e.g. DE, US, CH).\n * If users must enter the intl. prefix (e.g. +41), then you may pass \"ZZ\" or null as region.\n * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33}\n */\nexport function isPhoneNumber(value: string, region: string | null): boolean {\n const phoneUtil = PhoneNumberUtil.getInstance();\n try {\n const phoneNum = phoneUtil.parseAndKeepRawInput(value, region);\n const result = phoneUtil.isValidNumber(phoneNum);\n return result;\n } catch (error) {\n // logging?\n return false;\n }\n}\n\n/**\n * Checks if the string is a valid phone number.\n * @param region 2 characters uppercase country code (e.g. DE, US, CH).\n * If users must enter the intl. prefix (e.g. +41), then you may pass \"ZZ\" or null as region.\n * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33}\n */\nexport function IsPhoneNumber(region: string | null, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_PHONE_NUMBER,\n constraints: [region],\n validator: {\n validate: (value, args) => isPhoneNumber(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a valid phone number\",\n validationOptions\n ),\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_MILITARY_TIME = \"isMilitaryTime\";\n\n/**\n * Checks if the string represents a time without a given timezone in the format HH:MM (military)\n * If the given value does not match the pattern HH:MM, then it returns false.\n */\nexport function isMilitaryTime(value: unknown): boolean {\n const militaryTimeRegex = /^([01]\\d|2[0-3]):?([0-5]\\d)$/;\n return typeof value === \"string\" && validator.matches(value, militaryTimeRegex);\n}\n\n/**\n * Checks if the string represents a time without a given timezone in the format HH:MM (military)\n * If the given value does not match the pattern HH:MM, then it returns false.\n */\nexport function IsMilitaryTime(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_MILITARY_TIME,\n validator: {\n validate: (value, args) => isMilitaryTime(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a valid representation of military time in the format HH:MM\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_HASH = \"isHash\";\n\n/**\n * Check if the string is a hash of type algorithm.\n * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128',\n * 'tiger160', 'tiger192', 'crc32', 'crc32b']\n */\nexport function isHash(value: unknown, algorithm: ValidatorJS.HashAlgorithm): boolean {\n return typeof value === \"string\" && ValidatorJS.isHash(value, algorithm);\n}\n\n/**\n * Check if the string is a hash of type algorithm.\n * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128',\n * 'tiger160', 'tiger192', 'crc32', 'crc32b']\n */\nexport function IsHash(algorithm: string, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_HASH,\n constraints: [algorithm],\n validator: {\n validate: (value, args) => isHash(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a hash of type $constraint1\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_ISSN = \"isISSN\";\n\n/**\n * Checks if the string is a ISSN.\n * If given value is not a string, then it returns false.\n */\nexport function isISSN(value: unknown, options?: ValidatorJS.IsISSNOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isISSN(value, options);\n}\n\n/**\n * Checks if the string is a ISSN.\n * If given value is not a string, then it returns false.\n */\nexport function IsISSN(options?: ValidatorJS.IsISSNOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ISSN,\n constraints: [options],\n validator: {\n validate: (value, args) => isISSN(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a ISSN\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_DATE_STRING = \"isDateString\";\n\n/**\n * Checks if a given value is a ISOString date.\n */\nexport function isDateString(value: unknown): boolean {\n const regex = /^\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[\\+\\-][0-2]\\d(?:\\:[0-5]\\d)?)?$/g;\n return typeof value === \"string\" && regex.test(value);\n}\n\n/**\n * Checks if a given value is a ISOString date.\n */\nexport function IsDateString(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_DATE_STRING,\n validator: {\n validate: (value, args) => isDateString(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a ISOString\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_BOOLEAN_STRING = \"isBooleanString\";\n\n/**\n * Checks if a string is a boolean.\n * If given value is not a string, then it returns false.\n */\nexport function isBooleanString(value: unknown): boolean {\n return typeof value === \"string\" && validator.isBoolean(value);\n}\n\n/**\n * Checks if a string is a boolean.\n * If given value is not a string, then it returns false.\n */\nexport function IsBooleanString(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_BOOLEAN_STRING,\n validator: {\n validate: (value, args) => isBooleanString(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a boolean string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_NUMBER_STRING = \"isNumberString\";\n\n/**\n * Checks if the string is numeric.\n * If given value is not a string, then it returns false.\n */\nexport function isNumberString(value: unknown, options?: ValidatorJS.IsNumericOptions): boolean {\n return typeof value === \"string\" && ValidatorJS.isNumeric(value, options);\n}\n\n/**\n * Checks if the string is numeric.\n * If given value is not a string, then it returns false.\n */\nexport function IsNumberString(options?: ValidatorJS.IsNumericOptions, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_NUMBER_STRING,\n constraints: [options],\n validator: {\n validate: (value, args) => isNumberString(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a number string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_BASE32 = \"isBase32\";\n\n/**\n * Checks if a string is base32 encoded.\n * If given value is not a string, then it returns false.\n */\nexport function isBase32(value: unknown): boolean {\n return typeof value === \"string\" && validator.isBase32(value);\n}\n\n/**\n * Check if a string is base32 encoded.\n * If given value is not a string, then it returns false.\n */\nexport function IsBase32(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_BASE32,\n validator: {\n validate: (value, args) => isBase32(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be base32 encoded\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_BIC = \"isBIC\";\n\n/**\n * Check if a string is a BIC (Bank Identification Code) or SWIFT code.\n * If given value is not a string, then it returns false.\n */\nexport function isBIC(value: unknown): boolean {\n return typeof value === \"string\" && validator.isBIC(value);\n}\n\n/**\n * Check if a string is a BIC (Bank Identification Code) or SWIFT code.\n * If given value is not a string, then it returns false.\n */\nexport function IsBIC(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_BIC,\n validator: {\n validate: (value, args) => isBIC(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a BIC or SWIFT code\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_BTC_ADDRESS = \"isBtcAddress\";\n\n/**\n * Check if the string is a valid BTC address.\n * If given value is not a string, then it returns false.\n */\nexport function isBtcAddress(value: unknown): boolean {\n return typeof value === \"string\" && validator.isBtcAddress(value);\n}\n\n/**\n * Check if the string is a valid BTC address.\n * If given value is not a string, then it returns false.\n */\nexport function IsBtcAddress(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_BTC_ADDRESS,\n validator: {\n validate: (value, args) => isBtcAddress(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a BTC address\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_DATA_URI = \"isDataURI\";\n\n/**\n * Check if the string is a data uri format.\n * If given value is not a string, then it returns false.\n */\nexport function isDataURI(value: unknown): boolean {\n return typeof value === \"string\" && validator.isDataURI(value);\n}\n\n/**\n * Check if the string is a data uri format.\n * If given value is not a string, then it returns false.\n */\nexport function IsDataURI(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_DATA_URI,\n validator: {\n validate: (value, args) => isDataURI(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a data uri format\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_EAN = \"isEAN\";\n\n/**\n * Check if the string is an EAN (European Article Number).\n * If given value is not a string, then it returns false.\n */\nexport function isEAN(value: unknown): boolean {\n return typeof value === \"string\" && validator.isEAN(value);\n}\n\n/**\n * Check if the string is an EAN (European Article Number).\n * If given value is not a string, then it returns false.\n */\nexport function IsEAN(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_EAN,\n validator: {\n validate: (value, args) => isEAN(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an EAN (European Article Number)\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_ETHEREUM_ADDRESS = \"isEthereumAddress\";\n\n/**\n * Check if the string is an Ethereum address using basic regex. Does not validate address checksums.\n * If given value is not a string, then it returns false.\n */\nexport function isEthereumAddress(value: unknown): boolean {\n return typeof value === \"string\" && validator.isEthereumAddress(value);\n}\n\n/**\n * Check if the string is an Ethereum address using basic regex. Does not validate address checksums.\n * If given value is not a string, then it returns false.\n */\nexport function IsEthereumAddress(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ETHEREUM_ADDRESS,\n validator: {\n validate: (value, args) => isEthereumAddress(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an Ethereum address\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_HSL = \"isHSL\";\n\n/**\n* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification.\n * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)).\n * If given value is not a string, then it returns false.\n */\nexport function isHSL(value: unknown): boolean {\n return typeof value === \"string\" && validator.isHSL(value);\n}\n\n/**\n * Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification.\n * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)).\n * If given value is not a string, then it returns false.\n */\nexport function IsHSL(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_HSL,\n validator: {\n validate: (value, args) => isHSL(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a HSL color\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_IBAN = \"isIBAN\";\n\n/**\n * Check if a string is a IBAN (International Bank Account Number).\n * If given value is not a string, then it returns false.\n */\nexport function isIBAN(value: unknown): boolean {\n return typeof value === \"string\" && validator.isIBAN(value);\n}\n\n/**\n * Check if a string is a IBAN (International Bank Account Number).\n * If given value is not a string, then it returns false.\n */\nexport function IsIBAN(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_IBAN,\n validator: {\n validate: (value, args) => isIBAN(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an IBAN\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport ValidatorJS from \"validator\";\n\nexport const IS_IDENTITY_CARD = \"isIdentityCard\";\n\n/**\n * Check if the string is a valid identity card code.\n * locale is one of ['ES', 'zh-TW', 'he-IL', 'ar-TN'] OR 'any'. If 'any' is used, function will check if any of the locals match.\n * Defaults to 'any'.\n * If given value is not a string, then it returns false.\n */\nexport function isIdentityCard(value: unknown, locale: ValidatorJS.IdentityCardLocale): boolean {\n return typeof value === \"string\" && ValidatorJS.isIdentityCard(value, locale);\n}\n\n/**\n * Check if the string is a valid identity card code.\n * locale is one of ['ES', 'zh-TW', 'he-IL', 'ar-TN'] OR 'any'. If 'any' is used, function will check if any of the locals match.\n * Defaults to 'any'.\n * If given value is not a string, then it returns false.\n */\nexport function IsIdentityCard(locale?: ValidatorJS.IdentityCardLocale, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_IDENTITY_CARD,\n constraints: [locale],\n validator: {\n validate: (value, args) => isIdentityCard(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a identity card number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_ISRC = \"isISRC\";\n\n/**\n * Check if the string is a ISRC.\n * If given value is not a string, then it returns false.\n */\nexport function isISRC(value: unknown): boolean {\n return typeof value === \"string\" && validator.isISRC(value);\n}\n\n/**\n * Check if the string is a ISRC.\n * If given value is not a string, then it returns false.\n */\nexport function IsISRC(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ISRC,\n validator: {\n validate: (value, args) => isISRC(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an ISRC\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_LOCALE = \"isLocale\";\n\n/**\n * Check if the string is a locale.\n * If given value is not a string, then it returns false.\n */\nexport function isLocale(value: unknown): boolean {\n return typeof value === \"string\" && validator.isLocale(value);\n}\n\n/**\n * Check if the string is a locale.\n * If given value is not a string, then it returns false.\n */\nexport function IsLocale(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_LOCALE,\n validator: {\n validate: (value, args) => isLocale(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be locale\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_MAGNET_URI = \"isMagnetURI\";\n\n/**\n * Check if the string is a magnet uri format.\n * If given value is not a string, then it returns false.\n */\nexport function isMagnetURI(value: unknown): boolean {\n return typeof value === \"string\" && validator.isMagnetURI(value);\n}\n\n/**\n * Check if the string is a magnet uri format.\n * If given value is not a string, then it returns false.\n */\nexport function IsMagnetURI(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_MAGNET_URI,\n validator: {\n validate: (value, args) => isMagnetURI(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be magnet uri format\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_MIME_TYPE = \"isMimeType\";\n\n/**\n * Check if the string matches to a valid MIME type format\n * If given value is not a string, then it returns false.\n */\nexport function isMimeType(value: unknown): boolean {\n return typeof value === \"string\" && validator.isMimeType(value);\n}\n\n/**\n * Check if the string matches to a valid MIME type format\n * If given value is not a string, then it returns false.\n */\nexport function IsMimeType(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_MIME_TYPE,\n validator: {\n validate: (value, args) => isMimeType(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be MIME type format\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_OCTAL = \"isOctal\";\n\n/**\n * Check if the string is a valid octal number.\n * If given value is not a string, then it returns false.\n */\nexport function isOctal(value: unknown): boolean {\n return typeof value === \"string\" && validator.isOctal(value);\n}\n\n/**\n * Check if the string is a valid octal number.\n * If given value is not a string, then it returns false.\n */\nexport function IsOctal(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_OCTAL,\n validator: {\n validate: (value, args) => isOctal(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be valid octal number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_PASSPORT_NUMBER = \"isPassportNumber\";\n\n/**\n * Check if the string is a valid passport number relative to a specific country code.\n * If given value is not a string, then it returns false.\n */\nexport function isPassportNumber(value: unknown, countryCode: string): boolean {\n return typeof value === \"string\" && validator.isPassportNumber(value, countryCode);\n}\n\n/**\n * Check if the string is a valid passport number relative to a specific country code.\n * If given value is not a string, then it returns false.\n */\nexport function IsPassportNumber(countryCode: string, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_PASSPORT_NUMBER,\n constraints: [countryCode],\n validator: {\n validate: (value, args) => isPassportNumber(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be valid passport number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_POSTAL_CODE = \"isPostalCode\";\n\n/**\n * Check if the string is a postal code,\n * (locale is one of [ 'AD', 'AT', 'AU', 'BE', 'BG', 'BR', 'CA', 'CH', 'CZ', 'DE', 'DK', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'ID', 'IE' 'IL', 'IN', 'IR', 'IS', 'IT', 'JP', 'KE', 'LI', 'LT', 'LU', 'LV', 'MT', 'MX', 'NL', 'NO', 'NZ', 'PL', 'PR', 'PT', 'RO', 'RU', 'SA', 'SE', 'SI', 'TN', 'TW', 'UA', 'US', 'ZA', 'ZM' ] OR 'any'. If 'any' is used, function will check if any of the locals match. Locale list is validator.isPostalCodeLocales.).\n * If given value is not a string, then it returns false.\n */\nexport function isPostalCode(value: unknown, locale: validator.PostalCodeLocale): boolean {\n return typeof value === \"string\" && validator.isPostalCode(value, locale);\n}\n\n/**\n * Check if the string is a postal code,\n * (locale is one of [ 'AD', 'AT', 'AU', 'BE', 'BG', 'BR', 'CA', 'CH', 'CZ', 'DE', 'DK', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'ID', 'IE' 'IL', 'IN', 'IR', 'IS', 'IT', 'JP', 'KE', 'LI', 'LT', 'LU', 'LV', 'MT', 'MX', 'NL', 'NO', 'NZ', 'PL', 'PR', 'PT', 'RO', 'RU', 'SA', 'SE', 'SI', 'TN', 'TW', 'UA', 'US', 'ZA', 'ZM' ] OR 'any'. If 'any' is used, function will check if any of the locals match. Locale list is validator.isPostalCodeLocales.).\n * If given value is not a string, then it returns false.\n */\nexport function IsPostalCode(locale?: validator.PostalCodeLocale, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_POSTAL_CODE,\n constraints: [locale],\n validator: {\n validate: (value, args) => isPostalCode(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a postal code\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_RFC_3339 = \"isRFC3339\";\n\n/**\n * Check if the string is a valid RFC 3339 date.\n * If given value is not a string, then it returns false.\n */\nexport function isRFC3339(value: unknown): boolean {\n return typeof value === \"string\" && validator.isRFC3339(value);\n}\n\n/**\n * Check if the string is a valid RFC 3339 date.\n * If given value is not a string, then it returns false.\n */\nexport function IsRFC3339(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_RFC_3339,\n validator: {\n validate: (value, args) => isRFC3339(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be RFC 3339 date\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_RGB_COLOR = \"isRgbColor\";\n\n/**\n* Check if the string is a rgb or rgba color.\n * `includePercentValues` defaults to true. If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false.\n * If given value is not a string, then it returns false.\n */\nexport function isRgbColor(value: unknown, includePercentValues?: boolean): boolean {\n return typeof value === \"string\" && validator.isRgbColor(value, includePercentValues);\n}\n\n/**\n * Check if the string is a rgb or rgba color.\n * `includePercentValues` defaults to true. If you don't want to allow to set rgb or rgba values with percents, like rgb(5%,5%,5%), or rgba(90%,90%,90%,.3), then set it to false.\n * If given value is not a string, then it returns false.\n */\nexport function IsRgbColor(includePercentValues?: boolean, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_RGB_COLOR,\n constraints: [includePercentValues],\n validator: {\n validate: (value, args) => isRgbColor(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be RGB color\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport validator from \"validator\";\n\nexport const IS_SEM_VER = \"isSemVer\";\n\n/**\n * Check if the string is a Semantic Versioning Specification (SemVer).\n * If given value is not a string, then it returns false.\n */\nexport function isSemVer(value: unknown): boolean {\n return typeof value === \"string\" && validator.isSemVer(value);\n}\n\n/**\n * Check if the string is a Semantic Versioning Specification (SemVer).\n * If given value is not a string, then it returns false.\n */\nexport function IsSemVer(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_SEM_VER,\n validator: {\n validate: (value, args) => isSemVer(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a Semantic Versioning Specification\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_BOOLEAN = \"isBoolean\";\n\n/**\n * Checks if a given value is a number.\n */\nexport function isBoolean(value: unknown): boolean {\n return value instanceof Boolean || typeof value === \"boolean\";\n}\n\n/**\n * Checks if a value is a number.\n */\nexport function IsBoolean(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_BOOLEAN,\n validator: {\n validate: (value, args) => isBoolean(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a boolean value\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_DATE = \"isDate\";\n\n/**\n * Checks if a given value is a number.\n */\nexport function isDate(value: unknown): boolean {\n return value instanceof Date && !isNaN(value.getTime());\n}\n\n/**\n * Checks if a value is a number.\n */\nexport function IsDate(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_DATE,\n validator: {\n validate: (value, args) => isDate(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a Date instance\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_NUMBER = \"isNumber\";\n\n/**\n * Options to be passed to IsNumber decorator.\n */\nexport interface IsNumberOptions {\n allowNaN?: boolean;\n allowInfinity?: boolean;\n maxDecimalPlaces?: number;\n}\n\n/**\n * Checks if a given value is a number.\n */\nexport function isNumber(value: unknown, options: IsNumberOptions = {}): boolean {\n if (typeof value !== \"number\") {\n return false;\n }\n\n if (value === Infinity || value === -Infinity) {\n return options.allowInfinity;\n }\n\n if (Number.isNaN(value)) {\n return options.allowNaN;\n }\n\n if (options.maxDecimalPlaces !== undefined) {\n let decimalPlaces = 0;\n if ((value % 1) !== 0) {\n decimalPlaces = value.toString().split(\".\")[1].length;\n }\n if (decimalPlaces > options.maxDecimalPlaces) {\n return false;\n }\n }\n\n return Number.isFinite(value);\n}\n\n/**\n * Checks if a value is a number.\n */\nexport function IsNumber(options: IsNumberOptions = {}, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_NUMBER,\n constraints: [options],\n validator: {\n validate: (value, args) => isNumber(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a number conforming to the specified constraints\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_ENUM = \"isEnum\";\n\n/**\n * Checks if a given value is an enum\n */\nexport function isEnum(value: unknown, entity: any): boolean {\n const enumValues = Object.keys(entity)\n .map(k => entity[k]);\n return enumValues.indexOf(value) >= 0;\n}\n\n/**\n * Checks if a given value is an enum\n */\nexport function IsEnum(entity: Object, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ENUM,\n constraints: [entity],\n validator: {\n validate: (value, args) => isEnum(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a valid enum value\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_INT = \"isInt\";\n\n/**\n * Checks if value is an integer.\n */\nexport function isInt(val: unknown): boolean {\n return typeof val === \"number\" && Number.isInteger(val);\n}\n\n/**\n * Checks if value is an integer.\n */\nexport function IsInt(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_INT,\n validator: {\n validate: (value, args) => isInt(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an integer number\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_STRING = \"isString\";\n\n/**\n* Checks if a given value is a real string.\n*/\nexport function isString(value: unknown): value is string {\n return value instanceof String || typeof value === \"string\";\n}\n\n/**\n* Checks if a given value is a real string.\n*/\nexport function IsString(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_STRING,\n validator: {\n validate: (value, args) => isString(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a string\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_ARRAY = \"isArray\";\n\n/**\n * Checks if a given value is an array\n */\nexport function isArray(value: unknown): boolean {\n return value instanceof Array;\n}\n\n/**\n * Checks if a given value is an array\n */\nexport function IsArray(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_ARRAY,\n validator: {\n validate: (value, args) => isArray(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an array\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_OBJECT = \"isObject\";\n\n/**\n * Checks if the value is valid Object.\n * Returns false if the value is not an object.\n */\nexport function isObject(value: unknown): value is object {\n return value != null && (typeof value === \"object\" || typeof value === \"function\") && !Array.isArray(value);\n}\n\n/**\n * Checks if the value is valid Object.\n * Returns false if the value is not an object.\n */\nexport function IsObject(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_OBJECT,\n validator: {\n validate: (value, args) => isObject(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be an object\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const ARRAY_CONTAINS = \"arrayContains\";\n\n/**\n * Checks if array contains all values from the given array of values.\n * If null or undefined is given then this function returns false.\n */\nexport function arrayContains(array: unknown, values: any[]) {\n if (!(array instanceof Array))\n return false;\n\n return values.every(value => array.indexOf(value) !== -1);\n}\n\n/**\n * Checks if array contains all values from the given array of values.\n * If null or undefined is given then this function returns false.\n */\nexport function ArrayContains(values: any[], validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: ARRAY_CONTAINS,\n constraints: [values],\n validator: {\n validate: (value, args) => arrayContains(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain $constraint1 values\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const ARRAY_NOT_CONTAINS = \"arrayNotContains\";\n\n/**\n * Checks if array does not contain any of the given values.\n * If null or undefined is given then this function returns false.\n */\nexport function arrayNotContains(array: unknown, values: any[]) {\n if (!(array instanceof Array))\n return false;\n\n return values.every(value => array.indexOf(value) === -1);\n}\n\n/**\n * Checks if array does not contain any of the given values.\n * If null or undefined is given then this function returns false.\n */\nexport function ArrayNotContains(values: any[], validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: ARRAY_NOT_CONTAINS,\n constraints: [values],\n validator: {\n validate: (value, args) => arrayNotContains(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property should not contain $constraint1 values\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const ARRAY_NOT_EMPTY = \"arrayNotEmpty\";\n\n/**\n * Checks if given array is not empty.\n * If null or undefined is given then this function returns false.\n */\nexport function arrayNotEmpty(array: unknown) {\n return array instanceof Array && array.length > 0;\n}\n\n/**\n * Checks if given array is not empty.\n * If null or undefined is given then this function returns false.\n */\nexport function ArrayNotEmpty(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: ARRAY_NOT_EMPTY,\n validator: {\n validate: (value, args) => arrayNotEmpty(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property should not be empty\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const ARRAY_MIN_SIZE = \"arrayMinSize\";\n\n/**\n * Checks if array's length is as minimal this number.\n * If null or undefined is given then this function returns false.\n */\nexport function arrayMinSize(array: unknown, min: number) {\n return array instanceof Array && array.length >= min;\n}\n\n/**\n * Checks if array's length is as minimal this number.\n * If null or undefined is given then this function returns false.\n */\nexport function ArrayMinSize(min: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: ARRAY_MIN_SIZE,\n constraints: [min],\n validator: {\n validate: (value, args) => arrayMinSize(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain at least $constraint1 elements\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const ARRAY_MAX_SIZE = \"arrayMaxSize\";\n\n/**\n * Checks if array's length is as maximal this number.\n * If null or undefined is given then this function returns false.\n */\nexport function arrayMaxSize(array: unknown, max: number) {\n return array instanceof Array && array.length <= max;\n}\n\n/**\n * Checks if array's length is as maximal this number.\n * If null or undefined is given then this function returns false.\n */\nexport function ArrayMaxSize(max: number, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: ARRAY_MAX_SIZE,\n constraints: [max],\n validator: {\n validate: (value, args) => arrayMaxSize(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must contain not more than $constraint1 elements\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const ARRAY_UNIQUE = \"arrayUnique\";\n\n/**\n * Checks if all array's values are unique. Comparison for objects is reference-based.\n * If null or undefined is given then this function returns false.\n */\nexport function arrayUnique(array: unknown) {\n if (!(array instanceof Array))\n return false;\n\n const uniqueItems = array.filter((a, b, c) => c.indexOf(a) === b);\n return array.length === uniqueItems.length;\n}\n\n/**\n * Checks if all array's values are unique. Comparison for objects is reference-based.\n * If null or undefined is given then this function returns false.\n */\nexport function ArrayUnique(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: ARRAY_UNIQUE,\n validator: {\n validate: (value, args) => arrayUnique(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"All $property's elements must be unique\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\nimport { isObject } from \"../typechecker/IsObject\";\n\nexport const IS_NOT_EMPTY_OBJECT = \"isNotEmptyObject\";\n\n/**\n * Checks if the value is valid Object & not empty.\n * Returns false if the value is not an object or an empty valid object.\n */\nexport function isNotEmptyObject(value: unknown): boolean {\n if (!isObject(value)) {\n return false;\n }\n for (const key in value) {\n if (value.hasOwnProperty(key)) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Checks if the value is valid Object & not empty.\n * Returns false if the value is not an object or an empty valid object.\n */\nexport function IsNotEmptyObject(validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_NOT_EMPTY_OBJECT,\n validator: {\n validate: (value, args) => isNotEmptyObject(value),\n defaultMessage: buildMessage(\n (eachPrefix) => eachPrefix + \"$property must be a non-empty object\",\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { buildMessage, ValidateBy } from \"../common/ValidateBy\";\n\nexport const IS_INSTANCE = \"isInstance\";\n\n/**\n * Checks if the value is an instance of the specified object.\n */\nexport function isInstance(object: unknown, targetTypeConstructor: new (...args: any[]) => any) {\n return targetTypeConstructor\n && typeof targetTypeConstructor === \"function\"\n && object instanceof targetTypeConstructor;\n}\n\n/**\n * Checks if the value is an instance of the specified object.\n */\nexport function IsInstance(targetType: new (...args: any[]) => any, validationOptions?: ValidationOptions): PropertyDecorator {\n return ValidateBy(\n {\n name: IS_INSTANCE,\n constraints: [targetType],\n validator: {\n validate: (value, args) => isInstance(value, args.constraints[0]),\n defaultMessage: buildMessage(\n (eachPrefix, args) => {\n if (args.constraints[0]) {\n return eachPrefix + `$property must be an instance of ${args.constraints[0].name}`;\n } else {\n return eachPrefix + `${IS_INSTANCE} decorator expects and object as value, but got falsy value.`;\n }\n },\n validationOptions\n )\n }\n },\n validationOptions\n );\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { ValidationMetadataArgs } from \"../../metadata/ValidationMetadataArgs\";\nimport { ValidationTypes } from \"../../validation/ValidationTypes\";\nimport { ValidationMetadata } from \"../../metadata/ValidationMetadata\";\nimport { getMetadataStorage } from \"../../metadata/MetadataStorage\";\n\n/**\n * If object has both allowed and not allowed properties a validation error will be thrown.\n */\nexport function Allow(validationOptions?: ValidationOptions): PropertyDecorator {\n return function (object: Object, propertyName: string) {\n const args: ValidationMetadataArgs = {\n type: ValidationTypes.WHITELIST,\n target: object.constructor,\n propertyName: propertyName,\n validationOptions: validationOptions\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { ValidationMetadataArgs } from \"../../metadata/ValidationMetadataArgs\";\nimport { ValidationTypes } from \"../../validation/ValidationTypes\";\nimport { ValidationMetadata } from \"../../metadata/ValidationMetadata\";\nimport { getMetadataStorage } from \"../../metadata/MetadataStorage\";\n\n/**\n * Checks if value is missing and if so, ignores all validators.\n */\nexport function IsOptional(validationOptions?: ValidationOptions): PropertyDecorator {\n return function (object: Object, propertyName: string) {\n const args: ValidationMetadataArgs = {\n type: ValidationTypes.CONDITIONAL_VALIDATION,\n target: object.constructor,\n propertyName: propertyName,\n constraints: [(object: any, value: any) => {\n return object[propertyName] !== null && object[propertyName] !== undefined;\n }],\n validationOptions: validationOptions\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { ValidationMetadataArgs } from \"../../metadata/ValidationMetadataArgs\";\nimport { ValidationMetadata } from \"../../metadata/ValidationMetadata\";\nimport { getMetadataStorage } from \"../../metadata/MetadataStorage\";\nimport { ValidationTypes } from \"../../validation/ValidationTypes\";\nimport { ConstraintMetadata } from \"../../metadata/ConstraintMetadata\";\n\n/**\n * Registers custom validator class.\n */\nexport function ValidatorConstraint(options?: { name?: string, async?: boolean }) {\n return function (target: Function) {\n const isAsync = options && options.async ? true : false;\n let name = options && options.name ? options.name : \"\";\n if (!name) {\n name = (target as any).name;\n if (!name) // generate name if it was not given\n name = name.replace(/\\.?([A-Z]+)/g, (x, y) => \"_\" + y.toLowerCase()).replace(/^_/, \"\");\n }\n const metadata = new ConstraintMetadata(target, name, isAsync);\n getMetadataStorage().addConstraintMetadata(metadata);\n };\n}\n\n/**\n * Performs validation based on the given custom validation class.\n * Validation class must be decorated with ValidatorConstraint decorator.\n */\nexport function Validate(constraintClass: Function, validationOptions?: ValidationOptions): PropertyDecorator;\nexport function Validate(constraintClass: Function, constraints?: any[], validationOptions?: ValidationOptions): PropertyDecorator;\nexport function Validate(constraintClass: Function, constraintsOrValidationOptions?: any[] | ValidationOptions, maybeValidationOptions?: ValidationOptions): PropertyDecorator {\n return function (object: Object, propertyName: string) {\n const args: ValidationMetadataArgs = {\n type: ValidationTypes.CUSTOM_VALIDATION,\n target: object.constructor,\n propertyName: propertyName,\n constraintCls: constraintClass,\n constraints: constraintsOrValidationOptions instanceof Array ? constraintsOrValidationOptions as any[] : undefined,\n validationOptions: !(constraintsOrValidationOptions instanceof Array) ? constraintsOrValidationOptions as ValidationOptions : maybeValidationOptions\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { ValidationMetadataArgs } from \"../../metadata/ValidationMetadataArgs\";\nimport { ValidationTypes } from \"../../validation/ValidationTypes\";\nimport { ValidationMetadata } from \"../../metadata/ValidationMetadata\";\nimport { getMetadataStorage } from \"../../metadata/MetadataStorage\";\n\n/**\n * Objects / object arrays marked with this decorator will also be validated.\n */\nexport function ValidateIf(condition: (object: any, value: any) => boolean, validationOptions?: ValidationOptions): PropertyDecorator {\n return function (object: Object, propertyName: string) {\n const args: ValidationMetadataArgs = {\n type: ValidationTypes.CONDITIONAL_VALIDATION,\n target: object.constructor,\n propertyName: propertyName,\n constraints: [condition],\n validationOptions: validationOptions\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { ValidationMetadataArgs } from \"../../metadata/ValidationMetadataArgs\";\nimport { ValidationTypes } from \"../../validation/ValidationTypes\";\nimport { ValidationMetadata } from \"../../metadata/ValidationMetadata\";\nimport { getMetadataStorage } from \"../../metadata/MetadataStorage\";\n\n/**\n * Objects / object arrays marked with this decorator will also be validated.\n */\nexport function ValidateNested(validationOptions?: ValidationOptions): PropertyDecorator {\n const opts: ValidationOptions = { ...validationOptions };\n const eachPrefix = opts.each ? \"each value in \" : \"\";\n opts.message = opts.message || eachPrefix + \"nested property $property must be either object or array\";\n\n return function (object: Object, propertyName: string) {\n const args: ValidationMetadataArgs = {\n type: ValidationTypes.NESTED_VALIDATION,\n target: object.constructor,\n propertyName: propertyName,\n validationOptions: opts,\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n","import { ValidationOptions } from \"../ValidationOptions\";\nimport { ValidationMetadataArgs } from \"../../metadata/ValidationMetadataArgs\";\nimport { ValidationTypes } from \"../../validation/ValidationTypes\";\nimport { ValidationMetadata } from \"../../metadata/ValidationMetadata\";\nimport { getMetadataStorage } from \"../../metadata/MetadataStorage\";\n\n/**\n * Resolve promise before validation\n */\nexport function ValidatePromise(validationOptions?: ValidationOptions): PropertyDecorator {\n return function (object: Object, propertyName: string) {\n const args: ValidationMetadataArgs = {\n type: ValidationTypes.PROMISE_VALIDATION,\n target: object.constructor,\n propertyName: propertyName,\n validationOptions: validationOptions,\n };\n getMetadataStorage().addValidationMetadata(new ValidationMetadata(args));\n };\n}\n","import {ValidationError} from \"./validation/ValidationError\";\nimport {ValidatorOptions} from \"./validation/ValidatorOptions\";\nimport {ValidationSchema} from \"./validation-schema/ValidationSchema\";\nimport {getMetadataStorage} from \"./metadata/MetadataStorage\";\nimport {Validator} from \"./validation/Validator\";\nimport {getFromContainer} from \"./container\";\n\n// -------------------------------------------------------------------------\n// Export everything api users needs\n// -------------------------------------------------------------------------\n\nexport * from \"./container\";\nexport * from \"./decorator/decorators\";\nexport * from \"./decorator/ValidationOptions\";\nexport * from \"./validation/ValidatorConstraintInterface\";\nexport * from \"./validation/ValidationError\";\nexport * from \"./validation/ValidatorOptions\";\nexport * from \"./validation/ValidationArguments\";\nexport * from \"./validation/ValidationTypes\";\nexport * from \"./validation/Validator\";\nexport * from \"./validation-schema/ValidationSchema\";\nexport * from \"./register-decorator\";\nexport * from \"./metadata/MetadataStorage\";\n\n// -------------------------------------------------------------------------\n// Shortcut methods for api users\n// -------------------------------------------------------------------------\n\n/**\n * Validates given object.\n */\nexport function validate(object: Object, validatorOptions?: ValidatorOptions): Promise;\n\n/**\n * Validates given object by a given validation schema.\n */\nexport function validate(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): Promise;\n\n/**\n * Validates given object by object's decorators or given validation schema.\n */\nexport function validate(schemaNameOrObject: Object|string,\n objectOrValidationOptions?: Object|ValidatorOptions,\n maybeValidatorOptions?: ValidatorOptions): Promise {\n if (typeof schemaNameOrObject === \"string\") {\n return getFromContainer(Validator).validate(schemaNameOrObject as string, objectOrValidationOptions as Object, maybeValidatorOptions);\n } else {\n return getFromContainer(Validator).validate(schemaNameOrObject as Object, objectOrValidationOptions as ValidatorOptions);\n }\n}\n\n/**\n * Validates given object and reject on error.\n */\nexport function validateOrReject(object: Object, validatorOptions?: ValidatorOptions): Promise;\n\n/**\n * Validates given object by a given validation schema and reject on error.\n */\nexport function validateOrReject(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): Promise;\n\n/**\n * Validates given object by object's decorators or given validation schema and reject on error.\n */\nexport function validateOrReject(schemaNameOrObject: Object|string,\n objectOrValidationOptions?: Object|ValidatorOptions,\n maybeValidatorOptions?: ValidatorOptions): Promise {\n if (typeof schemaNameOrObject === \"string\") {\n return getFromContainer(Validator).validateOrReject(schemaNameOrObject as string, objectOrValidationOptions as Object, maybeValidatorOptions);\n } else {\n return getFromContainer(Validator).validateOrReject(schemaNameOrObject as Object, objectOrValidationOptions as ValidatorOptions);\n }\n}\n\n/**\n * Performs sync validation of the given object.\n * Note that this method completely ignores async validations.\n * If you want to properly perform validation you need to call validate method instead.\n */\nexport function validateSync(object: Object, validatorOptions?: ValidatorOptions): ValidationError[];\n\n/**\n * Validates given object by a given validation schema.\n * Note that this method completely ignores async validations.\n * If you want to properly perform validation you need to call validate method instead.\n */\nexport function validateSync(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): ValidationError[];\n\n/**\n * Validates given object by object's decorators or given validation schema.\n * Note that this method completely ignores async validations.\n * If you want to properly perform validation you need to call validate method instead.\n */\nexport function validateSync(schemaNameOrObject: Object|string,\n objectOrValidationOptions?: Object|ValidatorOptions,\n maybeValidatorOptions?: ValidatorOptions): ValidationError[] {\n if (typeof schemaNameOrObject === \"string\") {\n return getFromContainer(Validator).validateSync(schemaNameOrObject as string, objectOrValidationOptions as Object, maybeValidatorOptions);\n } else {\n return getFromContainer(Validator).validateSync(schemaNameOrObject as Object, objectOrValidationOptions as ValidatorOptions);\n }\n}\n\n/**\n * Registers a new validation schema.\n */\nexport function registerSchema(schema: ValidationSchema): void {\n getMetadataStorage().addValidationSchema(schema);\n}\n"],"names":["args","this","undefined","type","target","propertyName","constraints","constraintCls","validationTypeOptions","validationOptions","message","groups","always","each","context","ValidationSchemaToMetadataTransformer","schema","metadatas","Object","keys","properties","forEach","property","validation","name","options","push","ValidationMetadata","getMetadataStorage","window","global","classValidatorMetadataStorage","MetadataStorage","validationMetadatas","length","transform","validationMetadata","_this","addValidationMetadata","metadata","constraintMetadatas","grouped","targetConstructor","targetSchema","originalMetadatas","filter","find","group","indexOf","uniqueInheritedMetadatas","Function","prototype","inheritedMetadata","originalMetadata","concat","ValidationError","shouldDecorate","hasParent","parentPath","propConstraintFailed","boldStart","boldEnd","join","formattedProperty_1","Number","isInteger","children","map","childError","toString","constructor","ValidationTypes","key","ValidationUtils","validationArguments","messageString","Array","constraint","index","replace","RegExp","value","targetName","isPromise","p","then","ValidationExecutor","object","validationErrors","metadataStorage","hasValidationMetaData","console","warn","validatorOptions","targetMetadatas","getTargetValidationMetadatas","groupedMetadatas","groupByPropertyName","forbidUnknownValues","validationError","unknownValue","whitelist","definedMetadatas","IS_DEFINED","WHITELIST","Promise","PROMISE_VALIDATION","awaitingPromises","resolvedValue","performValidations","notAllowedProperties","forbidNonWhitelisted","generateValidationError","errors","error","stripEmptyErrors","customValidationMetadatas","CUSTOM_VALIDATION","nestedValidationMetadatas","NESTED_VALIDATION","conditionalValidationMetadatas","CONDITIONAL_VALIDATION","conditionalValidations","customValidations","mapContexts","skipUndefinedProperties","skipNullProperties","skipMissingProperties","nestedValidations","reduce","resultA","resultB","getTargetValidatorConstraints","customConstraintMetadata","async","ignoreAsyncValidations","Set","Map","val","validatedSubValues","from","values","isArray","subValue","instance","validate","some","validatedSubValue","asyncValidatedSubValues","resolve","asyncValidationIsFinishedPromise","all","flatValidatedValues","every","isValid","_a","contexts","assign","_b","validatedValue","promise","execute","customConstraint","getConstraintType","customValidatorMetadata","dismissDefaultMessages","defaultMessage","replaceMessageSpecialTokens","validator","Validator","objectOrSchemaName","objectOrValidationOptions","maybeValidatorOptions","executor","coreValidate","reject","userContainer","userContainerOptions","defaultContainer","class_1","someClass","instances","getFromContainer","get","fallback","fallbackOnErrors","ConstraintMetadata","registerDecorator","validator_1","CustomConstraint","addConstraintMetadata","validationMetadataArgs","buildMessage","impl","eachPrefix","ValidateBy","isDefined","IS_LATLONG","isLatLong","IS_LATITUDE","isLatitude","IS_LONGITUDE","isLongitude","EQUALS","equals","comparison","NOT_EQUALS","notEquals","IS_EMPTY","isEmpty","IS_NOT_EMPTY","isNotEmpty","isIn","possibleValues","possibleValue","IS_NOT_IN","isNotIn","IS_DIVISIBLE_BY","isDivisibleBy","num","String","IS_POSITIVE","isPositive","IS_NEGATIVE","isNegative","max","min","MIN_DATE","minDate","date","Date","getTime","MAX_DATE","maxDate","CONTAINS","contains","seed","NOT_CONTAINS","notContains","IS_ALPHA","isAlpha","locale","ValidatorJS","IS_ALPHANUMERIC","isAlphanumeric","IS_DECIMAL","isDecimal","IS_ASCII","isAscii","IS_BASE64","isBase64","IS_BYTE_LENGTH","isByteLength","IS_CREDIT_CARD","isCreditCard","IS_CURRENCY","isCurrency","IS_EMAIL","isEmail","isFQDN","IS_FULL_WIDTH","isFullWidth","IS_HALF_WIDTH","isHalfWidth","IS_VARIABLE_WIDTH","isVariableWidth","IS_HEX_COLOR","isHexColor","IS_HEXADECIMAL","isHexadecimal","isValidationOptions","IS_MAC_ADDRESS","isMACAddress","isIP","version","versionStr","isPort","isISBN","isISIN","IS_ISO8601","isISO8601","isJSON","isJWT","IS_LOWERCASE","isLowercase","IS_MOBILE_PHONE","isMobilePhone","IS_ISO31661_ALPHA_2","isISO31661Alpha2","IS_ISO31661_ALPHA_3","isISO31661Alpha3","IS_MONGO_ID","isMongoId","IS_MULTIBYTE","isMultibyte","IS_SURROGATE_PAIR","isSurrogatePair","isURL","isUUID","IS_FIREBASE_PUSH_ID","isFirebasePushId","test","IS_UPPERCASE","isUppercase","isLength","MAX_LENGTH","maxLength","MIN_LENGTH","minLength","MATCHES","matches","pattern","modifiers","IS_PHONE_NUMBER","isPhoneNumber","region","phoneUtil","PhoneNumberUtil","getInstance","phoneNum","parseAndKeepRawInput","isValidNumber","IS_MILITARY_TIME","isMilitaryTime","isHash","algorithm","isISSN","IS_DATE_STRING","isDateString","IS_BOOLEAN_STRING","isBooleanString","isBoolean","IS_NUMBER_STRING","isNumberString","isNumeric","IS_BASE32","isBase32","isBIC","IS_BTC_ADDRESS","isBtcAddress","IS_DATA_URI","isDataURI","isEAN","IS_ETHEREUM_ADDRESS","isEthereumAddress","isHSL","isIBAN","IS_IDENTITY_CARD","isIdentityCard","isISRC","IS_LOCALE","isLocale","IS_MAGNET_URI","isMagnetURI","IS_MIME_TYPE","isMimeType","IS_OCTAL","isOctal","IS_PASSPORT_NUMBER","isPassportNumber","countryCode","IS_POSTAL_CODE","isPostalCode","IS_RFC_3339","isRFC3339","IS_RGB_COLOR","isRgbColor","includePercentValues","IS_SEM_VER","isSemVer","IS_BOOLEAN","Boolean","isDate","isNaN","IS_NUMBER","isNumber","Infinity","allowInfinity","allowNaN","maxDecimalPlaces","decimalPlaces","split","isFinite","isEnum","entity","k","isInt","IS_STRING","isString","IS_ARRAY","IS_OBJECT","isObject","ARRAY_CONTAINS","arrayContains","array","ARRAY_NOT_CONTAINS","arrayNotContains","ARRAY_NOT_EMPTY","arrayNotEmpty","ARRAY_MIN_SIZE","arrayMinSize","ARRAY_MAX_SIZE","arrayMaxSize","ARRAY_UNIQUE","arrayUnique","uniqueItems","a","b","c","IS_NOT_EMPTY_OBJECT","isNotEmptyObject","hasOwnProperty","IS_INSTANCE","isInstance","targetTypeConstructor","targetType","optionsOrValidationOptionsArg","validationOptionsArg","isMinLength","isMaxLength","modifiersOrAnnotationOptions","maxValue","minValue","constraintClass","constraintsOrValidationOptions","maybeValidationOptions","condition","opts","isAsync","x","y","toLowerCase","addValidationSchema","iocContainer","schemaNameOrObject","validateOrReject","validateSync"],"mappings":"obAMA,MAiEI,SAAYA,GA1BZC,YAAmB,GAKnBA,aAAkB,EAKlBA,WAAgB,EAKhBA,kBAAgBC,EAYZD,KAAKE,KAAOH,EAAKG,KACjBF,KAAKG,OAASJ,EAAKI,OACnBH,KAAKI,aAAeL,EAAKK,aACzBJ,KAAKK,YAAcN,EAAKM,YACxBL,KAAKM,cAAgBP,EAAKO,cAC1BN,KAAKO,sBAAwBR,EAAKQ,sBAC9BR,EAAKS,oBACLR,KAAKS,QAAUV,EAAKS,kBAAkBC,QACtCT,KAAKU,OAASX,EAAKS,kBAAkBE,OACrCV,KAAKW,OAASZ,EAAKS,kBAAkBG,OACrCX,KAAKY,KAAOb,EAAKS,kBAAkBI,KACnCZ,KAAKa,QAAUd,EAAKS,kBAAkBK,aCxE9CC,sBAAA,SAAUC,GACN,IAAMC,EAAkC,GAoBxC,OAnBAC,OAAOC,KAAKH,EAAOI,YAAYC,QAAQ,SAAAC,GACnCN,EAAOI,WAAWE,GAAUD,QAAQ,SAAAE,GAChC,IAAMd,EAAuC,CACzCC,QAASa,EAAWb,QACpBC,OAAQY,EAAWZ,OACnBC,OAAQW,EAAWX,OACnBC,KAAMU,EAAWV,MAEfb,EAA+B,CACjCG,KAAM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