PATH:
opt
/
bitninja-dispatcher
/
node_modules
/
class-validator
/
esm5
/
decorator
/
common
{"version":3,"file":"ValidateNested.js","sourceRoot":"","sources":["../../../../src/decorator/common/ValidateNested.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,iBAAqC;IAClE,IAAM,IAAI,gBAA2B,iBAAiB,CAAE,CAAC;IACzD,IAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IACrD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,UAAU,GAAG,0DAA0D,CAAC;IAEvG,OAAO,UAAU,MAAc,EAAE,YAAoB;QACnD,IAAM,IAAI,GAA2B;YACnC,IAAI,EAAE,eAAe,CAAC,iBAAiB;YACvC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,IAAI;SACxB,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC;AACJ,CAAC","sourcesContent":["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): void {\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"]}
[-] IsLatitude.js
[edit]
[-] Allow.js
[edit]
[-] IsNotEmpty.js.map
[edit]
[-] Equals.js
[edit]
[-] Validate.js.map
[edit]
[-] ValidateNested.js
[edit]
[-] IsNotEmpty.js
[edit]
[-] IsNotIn.js
[edit]
[+]
..
[-] IsDefined.js
[edit]
[-] ValidatePromise.js
[edit]
[-] ValidateBy.js.map
[edit]
[-] IsOptional.js
[edit]
[-] NotEquals.js.map
[edit]
[-] NotEquals.js
[edit]
[-] IsLatitude.js.map
[edit]
[-] IsEmpty.js.map
[edit]
[-] Allow.js.map
[edit]
[-] ValidateBy.js
[edit]
[-] IsIn.js
[edit]
[-] ValidatePromise.js.map
[edit]
[-] Equals.js.map
[edit]
[-] IsIn.js.map
[edit]
[-] IsDefined.js.map
[edit]
[-] IsLatLong.js
[edit]
[-] Validate.js
[edit]
[-] IsNotIn.js.map
[edit]
[-] ValidateIf.js
[edit]
[-] ValidateNested.js.map
[edit]
[-] IsLongitude.js.map
[edit]
[-] IsOptional.js.map
[edit]
[-] IsLongitude.js
[edit]
[-] ValidateIf.js.map
[edit]
[-] IsEmpty.js
[edit]
[-] IsLatLong.js.map
[edit]