From 46e43f4bde4a35785b4997b81e86cd19f046b69b Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 21 Dec 2021 16:52:28 +0100 Subject: Commit --- src/node_modules/class-validator/README.md | 1010 ++++++ .../class-validator/bundles/index.esm.js | 3197 +++++++++++++++++ .../class-validator/bundles/index.esm.js.map | 1 + .../class-validator/bundles/index.esm.min.js | 2 + .../class-validator/bundles/index.esm.min.js.map | 1 + .../class-validator/bundles/index.umd.js | 3582 ++++++++++++++++++++ .../class-validator/bundles/index.umd.js.map | 1 + .../class-validator/bundles/index.umd.min.js | 2 + .../class-validator/bundles/index.umd.min.js.map | 1 + .../class-validator/esm2015/container.js | 47 + .../class-validator/esm2015/container.js.map | 1 + .../esm2015/decorator/ValidationOptions.js | 12 + .../esm2015/decorator/ValidationOptions.js.map | 1 + .../esm2015/decorator/array/ArrayContains.js | 27 + .../esm2015/decorator/array/ArrayContains.js.map | 1 + .../esm2015/decorator/array/ArrayMaxSize.js | 25 + .../esm2015/decorator/array/ArrayMaxSize.js.map | 1 + .../esm2015/decorator/array/ArrayMinSize.js | 25 + .../esm2015/decorator/array/ArrayMinSize.js.map | 1 + .../esm2015/decorator/array/ArrayNotContains.js | 27 + .../decorator/array/ArrayNotContains.js.map | 1 + .../esm2015/decorator/array/ArrayNotEmpty.js | 24 + .../esm2015/decorator/array/ArrayNotEmpty.js.map | 1 + .../esm2015/decorator/array/ArrayUnique.js | 27 + .../esm2015/decorator/array/ArrayUnique.js.map | 1 + .../esm2015/decorator/common/Allow.js | 19 + .../esm2015/decorator/common/Allow.js.map | 1 + .../esm2015/decorator/common/Equals.js | 23 + .../esm2015/decorator/common/Equals.js.map | 1 + .../esm2015/decorator/common/IsDefined.js | 24 + .../esm2015/decorator/common/IsDefined.js.map | 1 + .../esm2015/decorator/common/IsEmpty.js | 22 + .../esm2015/decorator/common/IsEmpty.js.map | 1 + .../esm2015/decorator/common/IsIn.js | 23 + .../esm2015/decorator/common/IsIn.js.map | 1 + .../esm2015/decorator/common/IsLatLong.js | 23 + .../esm2015/decorator/common/IsLatLong.js.map | 1 + .../esm2015/decorator/common/IsLatitude.js | 23 + .../esm2015/decorator/common/IsLatitude.js.map | 1 + .../esm2015/decorator/common/IsLongitude.js | 23 + .../esm2015/decorator/common/IsLongitude.js.map | 1 + .../esm2015/decorator/common/IsNotEmpty.js | 22 + .../esm2015/decorator/common/IsNotEmpty.js.map | 1 + .../esm2015/decorator/common/IsNotIn.js | 23 + .../esm2015/decorator/common/IsNotIn.js.map | 1 + .../esm2015/decorator/common/IsOptional.js | 22 + .../esm2015/decorator/common/IsOptional.js.map | 1 + .../esm2015/decorator/common/NotEquals.js | 23 + .../esm2015/decorator/common/NotEquals.js.map | 1 + .../esm2015/decorator/common/Validate.js | 35 + .../esm2015/decorator/common/Validate.js.map | 1 + .../esm2015/decorator/common/ValidateBy.js | 23 + .../esm2015/decorator/common/ValidateBy.js.map | 1 + .../esm2015/decorator/common/ValidateIf.js | 20 + .../esm2015/decorator/common/ValidateIf.js.map | 1 + .../esm2015/decorator/common/ValidateNested.js | 22 + .../esm2015/decorator/common/ValidateNested.js.map | 1 + .../esm2015/decorator/common/ValidatePromise.js | 19 + .../decorator/common/ValidatePromise.js.map | 1 + .../esm2015/decorator/date/MaxDate.js | 23 + .../esm2015/decorator/date/MaxDate.js.map | 1 + .../esm2015/decorator/date/MinDate.js | 23 + .../esm2015/decorator/date/MinDate.js.map | 1 + .../esm2015/decorator/decorators.js | 132 + .../esm2015/decorator/decorators.js.map | 1 + .../esm2015/decorator/number/IsDivisibleBy.js | 26 + .../esm2015/decorator/number/IsDivisibleBy.js.map | 1 + .../esm2015/decorator/number/IsNegative.js | 22 + .../esm2015/decorator/number/IsNegative.js.map | 1 + .../esm2015/decorator/number/IsPositive.js | 22 + .../esm2015/decorator/number/IsPositive.js.map | 1 + .../esm2015/decorator/number/Max.js | 23 + .../esm2015/decorator/number/Max.js.map | 1 + .../esm2015/decorator/number/Min.js | 23 + .../esm2015/decorator/number/Min.js.map | 1 + .../esm2015/decorator/object/IsInstance.js | 32 + .../esm2015/decorator/object/IsInstance.js.map | 1 + .../esm2015/decorator/object/IsNotEmptyObject.js | 33 + .../decorator/object/IsNotEmptyObject.js.map | 1 + .../esm2015/decorator/string/Contains.js | 26 + .../esm2015/decorator/string/Contains.js.map | 1 + .../esm2015/decorator/string/IsAlpha.js | 26 + .../esm2015/decorator/string/IsAlpha.js.map | 1 + .../esm2015/decorator/string/IsAlphanumeric.js | 26 + .../esm2015/decorator/string/IsAlphanumeric.js.map | 1 + .../esm2015/decorator/string/IsAscii.js | 25 + .../esm2015/decorator/string/IsAscii.js.map | 1 + .../esm2015/decorator/string/IsBIC.js | 25 + .../esm2015/decorator/string/IsBIC.js.map | 1 + .../esm2015/decorator/string/IsBase32.js | 25 + .../esm2015/decorator/string/IsBase32.js.map | 1 + .../esm2015/decorator/string/IsBase64.js | 25 + .../esm2015/decorator/string/IsBase64.js.map | 1 + .../esm2015/decorator/string/IsBooleanString.js | 25 + .../decorator/string/IsBooleanString.js.map | 1 + .../esm2015/decorator/string/IsBtcAddress.js | 25 + .../esm2015/decorator/string/IsBtcAddress.js.map | 1 + .../esm2015/decorator/string/IsByteLength.js | 26 + .../esm2015/decorator/string/IsByteLength.js.map | 1 + .../esm2015/decorator/string/IsCreditCard.js | 25 + .../esm2015/decorator/string/IsCreditCard.js.map | 1 + .../esm2015/decorator/string/IsCurrency.js | 26 + .../esm2015/decorator/string/IsCurrency.js.map | 1 + .../esm2015/decorator/string/IsDataURI.js | 25 + .../esm2015/decorator/string/IsDataURI.js.map | 1 + .../esm2015/decorator/string/IsDateString.js | 23 + .../esm2015/decorator/string/IsDateString.js.map | 1 + .../esm2015/decorator/string/IsDecimal.js | 26 + .../esm2015/decorator/string/IsDecimal.js.map | 1 + .../esm2015/decorator/string/IsEAN.js | 25 + .../esm2015/decorator/string/IsEAN.js.map | 1 + .../esm2015/decorator/string/IsEmail.js | 26 + .../esm2015/decorator/string/IsEmail.js.map | 1 + .../esm2015/decorator/string/IsEthereumAddress.js | 25 + .../decorator/string/IsEthereumAddress.js.map | 1 + .../esm2015/decorator/string/IsFQDN.js | 26 + .../esm2015/decorator/string/IsFQDN.js.map | 1 + .../esm2015/decorator/string/IsFirebasePushId.js | 25 + .../decorator/string/IsFirebasePushId.js.map | 1 + .../esm2015/decorator/string/IsFullWidth.js | 25 + .../esm2015/decorator/string/IsFullWidth.js.map | 1 + .../esm2015/decorator/string/IsHSL.js | 27 + .../esm2015/decorator/string/IsHSL.js.map | 1 + .../esm2015/decorator/string/IsHalfWidth.js | 25 + .../esm2015/decorator/string/IsHalfWidth.js.map | 1 + .../esm2015/decorator/string/IsHash.js | 28 + .../esm2015/decorator/string/IsHash.js.map | 1 + .../esm2015/decorator/string/IsHexColor.js | 25 + .../esm2015/decorator/string/IsHexColor.js.map | 1 + .../esm2015/decorator/string/IsHexadecimal.js | 25 + .../esm2015/decorator/string/IsHexadecimal.js.map | 1 + .../esm2015/decorator/string/IsIBAN.js | 25 + .../esm2015/decorator/string/IsIBAN.js.map | 1 + .../esm2015/decorator/string/IsIP.js | 27 + .../esm2015/decorator/string/IsIP.js.map | 1 + .../esm2015/decorator/string/IsISBN.js | 27 + .../esm2015/decorator/string/IsISBN.js.map | 1 + .../esm2015/decorator/string/IsISIN.js | 25 + .../esm2015/decorator/string/IsISIN.js.map | 1 + .../esm2015/decorator/string/IsISO31661Alpha2.js | 23 + .../decorator/string/IsISO31661Alpha2.js.map | 1 + .../esm2015/decorator/string/IsISO31661Alpha3.js | 23 + .../decorator/string/IsISO31661Alpha3.js.map | 1 + .../esm2015/decorator/string/IsISO8601.js | 28 + .../esm2015/decorator/string/IsISO8601.js.map | 1 + .../esm2015/decorator/string/IsISRC.js | 25 + .../esm2015/decorator/string/IsISRC.js.map | 1 + .../esm2015/decorator/string/IsISSN.js | 26 + .../esm2015/decorator/string/IsISSN.js.map | 1 + .../esm2015/decorator/string/IsIdentityCard.js | 30 + .../esm2015/decorator/string/IsIdentityCard.js.map | 1 + .../esm2015/decorator/string/IsJSON.js | 25 + .../esm2015/decorator/string/IsJSON.js.map | 1 + .../esm2015/decorator/string/IsJWT.js | 25 + .../esm2015/decorator/string/IsJWT.js.map | 1 + .../esm2015/decorator/string/IsLocale.js | 25 + .../esm2015/decorator/string/IsLocale.js.map | 1 + .../esm2015/decorator/string/IsLowercase.js | 25 + .../esm2015/decorator/string/IsLowercase.js.map | 1 + .../esm2015/decorator/string/IsMacAddress.js | 25 + .../esm2015/decorator/string/IsMacAddress.js.map | 1 + .../esm2015/decorator/string/IsMagnetURI.js | 25 + .../esm2015/decorator/string/IsMagnetURI.js.map | 1 + .../esm2015/decorator/string/IsMilitaryTime.js | 26 + .../esm2015/decorator/string/IsMilitaryTime.js.map | 1 + .../esm2015/decorator/string/IsMimeType.js | 25 + .../esm2015/decorator/string/IsMimeType.js.map | 1 + .../esm2015/decorator/string/IsMobilePhone.js | 42 + .../esm2015/decorator/string/IsMobilePhone.js.map | 1 + .../esm2015/decorator/string/IsMongoId.js | 25 + .../esm2015/decorator/string/IsMongoId.js.map | 1 + .../esm2015/decorator/string/IsMultibyte.js | 25 + .../esm2015/decorator/string/IsMultibyte.js.map | 1 + .../esm2015/decorator/string/IsNumberString.js | 26 + .../esm2015/decorator/string/IsNumberString.js.map | 1 + .../esm2015/decorator/string/IsOctal.js | 25 + .../esm2015/decorator/string/IsOctal.js.map | 1 + .../esm2015/decorator/string/IsPassportNumber.js | 26 + .../decorator/string/IsPassportNumber.js.map | 1 + .../esm2015/decorator/string/IsPhoneNumber.js | 40 + .../esm2015/decorator/string/IsPhoneNumber.js.map | 1 + .../esm2015/decorator/string/IsPort.js | 23 + .../esm2015/decorator/string/IsPort.js.map | 1 + .../esm2015/decorator/string/IsPostalCode.js | 28 + .../esm2015/decorator/string/IsPostalCode.js.map | 1 + .../esm2015/decorator/string/IsRFC3339.js | 25 + .../esm2015/decorator/string/IsRFC3339.js.map | 1 + .../esm2015/decorator/string/IsRgbColor.js | 28 + .../esm2015/decorator/string/IsRgbColor.js.map | 1 + .../esm2015/decorator/string/IsSemVer.js | 25 + .../esm2015/decorator/string/IsSemVer.js.map | 1 + .../esm2015/decorator/string/IsSurrogatePair.js | 25 + .../decorator/string/IsSurrogatePair.js.map | 1 + .../esm2015/decorator/string/IsUUID.js | 26 + .../esm2015/decorator/string/IsUUID.js.map | 1 + .../esm2015/decorator/string/IsUppercase.js | 25 + .../esm2015/decorator/string/IsUppercase.js.map | 1 + .../esm2015/decorator/string/IsUrl.js | 26 + .../esm2015/decorator/string/IsUrl.js.map | 1 + .../esm2015/decorator/string/IsVariableWidth.js | 25 + .../decorator/string/IsVariableWidth.js.map | 1 + .../esm2015/decorator/string/Length.js | 36 + .../esm2015/decorator/string/Length.js.map | 1 + .../esm2015/decorator/string/Matches.js | 25 + .../esm2015/decorator/string/Matches.js.map | 1 + .../esm2015/decorator/string/MaxLength.js | 26 + .../esm2015/decorator/string/MaxLength.js.map | 1 + .../esm2015/decorator/string/MinLength.js | 26 + .../esm2015/decorator/string/MinLength.js.map | 1 + .../esm2015/decorator/string/NotContains.js | 26 + .../esm2015/decorator/string/NotContains.js.map | 1 + .../esm2015/decorator/typechecker/IsArray.js | 22 + .../esm2015/decorator/typechecker/IsArray.js.map | 1 + .../esm2015/decorator/typechecker/IsBoolean.js | 22 + .../esm2015/decorator/typechecker/IsBoolean.js.map | 1 + .../esm2015/decorator/typechecker/IsDate.js | 22 + .../esm2015/decorator/typechecker/IsDate.js.map | 1 + .../esm2015/decorator/typechecker/IsEnum.js | 25 + .../esm2015/decorator/typechecker/IsEnum.js.map | 1 + .../esm2015/decorator/typechecker/IsInt.js | 22 + .../esm2015/decorator/typechecker/IsInt.js.map | 1 + .../esm2015/decorator/typechecker/IsNumber.js | 41 + .../esm2015/decorator/typechecker/IsNumber.js.map | 1 + .../esm2015/decorator/typechecker/IsObject.js | 24 + .../esm2015/decorator/typechecker/IsObject.js.map | 1 + .../esm2015/decorator/typechecker/IsString.js | 22 + .../esm2015/decorator/typechecker/IsString.js.map | 1 + src/node_modules/class-validator/esm2015/index.js | 57 + .../class-validator/esm2015/index.js.map | 1 + .../esm2015/metadata/ConstraintMetadata.js | 25 + .../esm2015/metadata/ConstraintMetadata.js.map | 1 + .../esm2015/metadata/MetadataStorage.js | 109 + .../esm2015/metadata/MetadataStorage.js.map | 1 + .../esm2015/metadata/ValidationMetadata.js | 41 + .../esm2015/metadata/ValidationMetadata.js.map | 1 + .../esm2015/metadata/ValidationMetadataArgs.js | 3 + .../esm2015/metadata/ValidationMetadataArgs.js.map | 1 + .../class-validator/esm2015/register-decorator.js | 44 + .../esm2015/register-decorator.js.map | 1 + src/node_modules/class-validator/esm2015/utils.js | 15 + .../class-validator/esm2015/utils.js.map | 1 + .../esm2015/validation-schema/ValidationSchema.js | 3 + .../validation-schema/ValidationSchema.js.map | 1 + .../ValidationSchemaToMetadataTransformer.js | 31 + .../ValidationSchemaToMetadataTransformer.js.map | 1 + .../esm2015/validation/ValidationArguments.js | 3 + .../esm2015/validation/ValidationArguments.js.map | 1 + .../esm2015/validation/ValidationError.js | 37 + .../esm2015/validation/ValidationError.js.map | 1 + .../esm2015/validation/ValidationExecutor.js | 316 ++ .../esm2015/validation/ValidationExecutor.js.map | 1 + .../esm2015/validation/ValidationTypes.js | 22 + .../esm2015/validation/ValidationTypes.js.map | 1 + .../esm2015/validation/ValidationUtils.js | 25 + .../esm2015/validation/ValidationUtils.js.map | 1 + .../esm2015/validation/Validator.js | 53 + .../esm2015/validation/Validator.js.map | 1 + .../validation/ValidatorConstraintInterface.js | 3 + .../validation/ValidatorConstraintInterface.js.map | 1 + .../esm2015/validation/ValidatorOptions.js | 3 + .../esm2015/validation/ValidatorOptions.js.map | 1 + src/node_modules/class-validator/esm5/container.js | 48 + .../class-validator/esm5/container.js.map | 1 + .../esm5/decorator/ValidationOptions.js | 12 + .../esm5/decorator/ValidationOptions.js.map | 1 + .../esm5/decorator/array/ArrayContains.js | 27 + .../esm5/decorator/array/ArrayContains.js.map | 1 + .../esm5/decorator/array/ArrayMaxSize.js | 25 + .../esm5/decorator/array/ArrayMaxSize.js.map | 1 + .../esm5/decorator/array/ArrayMinSize.js | 25 + .../esm5/decorator/array/ArrayMinSize.js.map | 1 + .../esm5/decorator/array/ArrayNotContains.js | 27 + .../esm5/decorator/array/ArrayNotContains.js.map | 1 + .../esm5/decorator/array/ArrayNotEmpty.js | 24 + .../esm5/decorator/array/ArrayNotEmpty.js.map | 1 + .../esm5/decorator/array/ArrayUnique.js | 27 + .../esm5/decorator/array/ArrayUnique.js.map | 1 + .../class-validator/esm5/decorator/common/Allow.js | 19 + .../esm5/decorator/common/Allow.js.map | 1 + .../esm5/decorator/common/Equals.js | 23 + .../esm5/decorator/common/Equals.js.map | 1 + .../esm5/decorator/common/IsDefined.js | 24 + .../esm5/decorator/common/IsDefined.js.map | 1 + .../esm5/decorator/common/IsEmpty.js | 22 + .../esm5/decorator/common/IsEmpty.js.map | 1 + .../class-validator/esm5/decorator/common/IsIn.js | 23 + .../esm5/decorator/common/IsIn.js.map | 1 + .../esm5/decorator/common/IsLatLong.js | 23 + .../esm5/decorator/common/IsLatLong.js.map | 1 + .../esm5/decorator/common/IsLatitude.js | 23 + .../esm5/decorator/common/IsLatitude.js.map | 1 + .../esm5/decorator/common/IsLongitude.js | 23 + .../esm5/decorator/common/IsLongitude.js.map | 1 + .../esm5/decorator/common/IsNotEmpty.js | 22 + .../esm5/decorator/common/IsNotEmpty.js.map | 1 + .../esm5/decorator/common/IsNotIn.js | 23 + .../esm5/decorator/common/IsNotIn.js.map | 1 + .../esm5/decorator/common/IsOptional.js | 22 + .../esm5/decorator/common/IsOptional.js.map | 1 + .../esm5/decorator/common/NotEquals.js | 23 + .../esm5/decorator/common/NotEquals.js.map | 1 + .../esm5/decorator/common/Validate.js | 35 + .../esm5/decorator/common/Validate.js.map | 1 + .../esm5/decorator/common/ValidateBy.js | 23 + .../esm5/decorator/common/ValidateBy.js.map | 1 + .../esm5/decorator/common/ValidateIf.js | 20 + .../esm5/decorator/common/ValidateIf.js.map | 1 + .../esm5/decorator/common/ValidateNested.js | 23 + .../esm5/decorator/common/ValidateNested.js.map | 1 + .../esm5/decorator/common/ValidatePromise.js | 19 + .../esm5/decorator/common/ValidatePromise.js.map | 1 + .../class-validator/esm5/decorator/date/MaxDate.js | 23 + .../esm5/decorator/date/MaxDate.js.map | 1 + .../class-validator/esm5/decorator/date/MinDate.js | 23 + .../esm5/decorator/date/MinDate.js.map | 1 + .../class-validator/esm5/decorator/decorators.js | 132 + .../esm5/decorator/decorators.js.map | 1 + .../esm5/decorator/number/IsDivisibleBy.js | 26 + .../esm5/decorator/number/IsDivisibleBy.js.map | 1 + .../esm5/decorator/number/IsNegative.js | 22 + .../esm5/decorator/number/IsNegative.js.map | 1 + .../esm5/decorator/number/IsPositive.js | 22 + .../esm5/decorator/number/IsPositive.js.map | 1 + .../class-validator/esm5/decorator/number/Max.js | 23 + .../esm5/decorator/number/Max.js.map | 1 + .../class-validator/esm5/decorator/number/Min.js | 23 + .../esm5/decorator/number/Min.js.map | 1 + .../esm5/decorator/object/IsInstance.js | 32 + .../esm5/decorator/object/IsInstance.js.map | 1 + .../esm5/decorator/object/IsNotEmptyObject.js | 33 + .../esm5/decorator/object/IsNotEmptyObject.js.map | 1 + .../esm5/decorator/string/Contains.js | 26 + .../esm5/decorator/string/Contains.js.map | 1 + .../esm5/decorator/string/IsAlpha.js | 26 + .../esm5/decorator/string/IsAlpha.js.map | 1 + .../esm5/decorator/string/IsAlphanumeric.js | 26 + .../esm5/decorator/string/IsAlphanumeric.js.map | 1 + .../esm5/decorator/string/IsAscii.js | 25 + .../esm5/decorator/string/IsAscii.js.map | 1 + .../class-validator/esm5/decorator/string/IsBIC.js | 25 + .../esm5/decorator/string/IsBIC.js.map | 1 + .../esm5/decorator/string/IsBase32.js | 25 + .../esm5/decorator/string/IsBase32.js.map | 1 + .../esm5/decorator/string/IsBase64.js | 25 + .../esm5/decorator/string/IsBase64.js.map | 1 + .../esm5/decorator/string/IsBooleanString.js | 25 + .../esm5/decorator/string/IsBooleanString.js.map | 1 + .../esm5/decorator/string/IsBtcAddress.js | 25 + .../esm5/decorator/string/IsBtcAddress.js.map | 1 + .../esm5/decorator/string/IsByteLength.js | 26 + .../esm5/decorator/string/IsByteLength.js.map | 1 + .../esm5/decorator/string/IsCreditCard.js | 25 + .../esm5/decorator/string/IsCreditCard.js.map | 1 + .../esm5/decorator/string/IsCurrency.js | 26 + .../esm5/decorator/string/IsCurrency.js.map | 1 + .../esm5/decorator/string/IsDataURI.js | 25 + .../esm5/decorator/string/IsDataURI.js.map | 1 + .../esm5/decorator/string/IsDateString.js | 23 + .../esm5/decorator/string/IsDateString.js.map | 1 + .../esm5/decorator/string/IsDecimal.js | 26 + .../esm5/decorator/string/IsDecimal.js.map | 1 + .../class-validator/esm5/decorator/string/IsEAN.js | 25 + .../esm5/decorator/string/IsEAN.js.map | 1 + .../esm5/decorator/string/IsEmail.js | 26 + .../esm5/decorator/string/IsEmail.js.map | 1 + .../esm5/decorator/string/IsEthereumAddress.js | 25 + .../esm5/decorator/string/IsEthereumAddress.js.map | 1 + .../esm5/decorator/string/IsFQDN.js | 26 + .../esm5/decorator/string/IsFQDN.js.map | 1 + .../esm5/decorator/string/IsFirebasePushId.js | 25 + .../esm5/decorator/string/IsFirebasePushId.js.map | 1 + .../esm5/decorator/string/IsFullWidth.js | 25 + .../esm5/decorator/string/IsFullWidth.js.map | 1 + .../class-validator/esm5/decorator/string/IsHSL.js | 27 + .../esm5/decorator/string/IsHSL.js.map | 1 + .../esm5/decorator/string/IsHalfWidth.js | 25 + .../esm5/decorator/string/IsHalfWidth.js.map | 1 + .../esm5/decorator/string/IsHash.js | 28 + .../esm5/decorator/string/IsHash.js.map | 1 + .../esm5/decorator/string/IsHexColor.js | 25 + .../esm5/decorator/string/IsHexColor.js.map | 1 + .../esm5/decorator/string/IsHexadecimal.js | 25 + .../esm5/decorator/string/IsHexadecimal.js.map | 1 + .../esm5/decorator/string/IsIBAN.js | 25 + .../esm5/decorator/string/IsIBAN.js.map | 1 + .../class-validator/esm5/decorator/string/IsIP.js | 27 + .../esm5/decorator/string/IsIP.js.map | 1 + .../esm5/decorator/string/IsISBN.js | 27 + .../esm5/decorator/string/IsISBN.js.map | 1 + .../esm5/decorator/string/IsISIN.js | 25 + .../esm5/decorator/string/IsISIN.js.map | 1 + .../esm5/decorator/string/IsISO31661Alpha2.js | 23 + .../esm5/decorator/string/IsISO31661Alpha2.js.map | 1 + .../esm5/decorator/string/IsISO31661Alpha3.js | 23 + .../esm5/decorator/string/IsISO31661Alpha3.js.map | 1 + .../esm5/decorator/string/IsISO8601.js | 28 + .../esm5/decorator/string/IsISO8601.js.map | 1 + .../esm5/decorator/string/IsISRC.js | 25 + .../esm5/decorator/string/IsISRC.js.map | 1 + .../esm5/decorator/string/IsISSN.js | 26 + .../esm5/decorator/string/IsISSN.js.map | 1 + .../esm5/decorator/string/IsIdentityCard.js | 30 + .../esm5/decorator/string/IsIdentityCard.js.map | 1 + .../esm5/decorator/string/IsJSON.js | 25 + .../esm5/decorator/string/IsJSON.js.map | 1 + .../class-validator/esm5/decorator/string/IsJWT.js | 25 + .../esm5/decorator/string/IsJWT.js.map | 1 + .../esm5/decorator/string/IsLocale.js | 25 + .../esm5/decorator/string/IsLocale.js.map | 1 + .../esm5/decorator/string/IsLowercase.js | 25 + .../esm5/decorator/string/IsLowercase.js.map | 1 + .../esm5/decorator/string/IsMacAddress.js | 25 + .../esm5/decorator/string/IsMacAddress.js.map | 1 + .../esm5/decorator/string/IsMagnetURI.js | 25 + .../esm5/decorator/string/IsMagnetURI.js.map | 1 + .../esm5/decorator/string/IsMilitaryTime.js | 26 + .../esm5/decorator/string/IsMilitaryTime.js.map | 1 + .../esm5/decorator/string/IsMimeType.js | 25 + .../esm5/decorator/string/IsMimeType.js.map | 1 + .../esm5/decorator/string/IsMobilePhone.js | 42 + .../esm5/decorator/string/IsMobilePhone.js.map | 1 + .../esm5/decorator/string/IsMongoId.js | 25 + .../esm5/decorator/string/IsMongoId.js.map | 1 + .../esm5/decorator/string/IsMultibyte.js | 25 + .../esm5/decorator/string/IsMultibyte.js.map | 1 + .../esm5/decorator/string/IsNumberString.js | 26 + .../esm5/decorator/string/IsNumberString.js.map | 1 + .../esm5/decorator/string/IsOctal.js | 25 + .../esm5/decorator/string/IsOctal.js.map | 1 + .../esm5/decorator/string/IsPassportNumber.js | 26 + .../esm5/decorator/string/IsPassportNumber.js.map | 1 + .../esm5/decorator/string/IsPhoneNumber.js | 40 + .../esm5/decorator/string/IsPhoneNumber.js.map | 1 + .../esm5/decorator/string/IsPort.js | 23 + .../esm5/decorator/string/IsPort.js.map | 1 + .../esm5/decorator/string/IsPostalCode.js | 28 + .../esm5/decorator/string/IsPostalCode.js.map | 1 + .../esm5/decorator/string/IsRFC3339.js | 25 + .../esm5/decorator/string/IsRFC3339.js.map | 1 + .../esm5/decorator/string/IsRgbColor.js | 28 + .../esm5/decorator/string/IsRgbColor.js.map | 1 + .../esm5/decorator/string/IsSemVer.js | 25 + .../esm5/decorator/string/IsSemVer.js.map | 1 + .../esm5/decorator/string/IsSurrogatePair.js | 25 + .../esm5/decorator/string/IsSurrogatePair.js.map | 1 + .../esm5/decorator/string/IsUUID.js | 26 + .../esm5/decorator/string/IsUUID.js.map | 1 + .../esm5/decorator/string/IsUppercase.js | 25 + .../esm5/decorator/string/IsUppercase.js.map | 1 + .../class-validator/esm5/decorator/string/IsUrl.js | 26 + .../esm5/decorator/string/IsUrl.js.map | 1 + .../esm5/decorator/string/IsVariableWidth.js | 25 + .../esm5/decorator/string/IsVariableWidth.js.map | 1 + .../esm5/decorator/string/Length.js | 36 + .../esm5/decorator/string/Length.js.map | 1 + .../esm5/decorator/string/Matches.js | 25 + .../esm5/decorator/string/Matches.js.map | 1 + .../esm5/decorator/string/MaxLength.js | 26 + .../esm5/decorator/string/MaxLength.js.map | 1 + .../esm5/decorator/string/MinLength.js | 26 + .../esm5/decorator/string/MinLength.js.map | 1 + .../esm5/decorator/string/NotContains.js | 26 + .../esm5/decorator/string/NotContains.js.map | 1 + .../esm5/decorator/typechecker/IsArray.js | 22 + .../esm5/decorator/typechecker/IsArray.js.map | 1 + .../esm5/decorator/typechecker/IsBoolean.js | 22 + .../esm5/decorator/typechecker/IsBoolean.js.map | 1 + .../esm5/decorator/typechecker/IsDate.js | 22 + .../esm5/decorator/typechecker/IsDate.js.map | 1 + .../esm5/decorator/typechecker/IsEnum.js | 25 + .../esm5/decorator/typechecker/IsEnum.js.map | 1 + .../esm5/decorator/typechecker/IsInt.js | 22 + .../esm5/decorator/typechecker/IsInt.js.map | 1 + .../esm5/decorator/typechecker/IsNumber.js | 43 + .../esm5/decorator/typechecker/IsNumber.js.map | 1 + .../esm5/decorator/typechecker/IsObject.js | 24 + .../esm5/decorator/typechecker/IsObject.js.map | 1 + .../esm5/decorator/typechecker/IsString.js | 22 + .../esm5/decorator/typechecker/IsString.js.map | 1 + src/node_modules/class-validator/esm5/index.js | 57 + src/node_modules/class-validator/esm5/index.js.map | 1 + .../esm5/metadata/ConstraintMetadata.js | 32 + .../esm5/metadata/ConstraintMetadata.js.map | 1 + .../esm5/metadata/MetadataStorage.js | 116 + .../esm5/metadata/MetadataStorage.js.map | 1 + .../esm5/metadata/ValidationMetadata.js | 43 + .../esm5/metadata/ValidationMetadata.js.map | 1 + .../esm5/metadata/ValidationMetadataArgs.js | 3 + .../esm5/metadata/ValidationMetadataArgs.js.map | 1 + .../class-validator/esm5/register-decorator.js | 47 + .../class-validator/esm5/register-decorator.js.map | 1 + src/node_modules/class-validator/esm5/utils.js | 15 + src/node_modules/class-validator/esm5/utils.js.map | 1 + .../esm5/validation-schema/ValidationSchema.js | 3 + .../esm5/validation-schema/ValidationSchema.js.map | 1 + .../ValidationSchemaToMetadataTransformer.js | 35 + .../ValidationSchemaToMetadataTransformer.js.map | 1 + .../esm5/validation/ValidationArguments.js | 3 + .../esm5/validation/ValidationArguments.js.map | 1 + .../esm5/validation/ValidationError.js | 45 + .../esm5/validation/ValidationError.js.map | 1 + .../esm5/validation/ValidationExecutor.js | 326 ++ .../esm5/validation/ValidationExecutor.js.map | 1 + .../esm5/validation/ValidationTypes.js | 27 + .../esm5/validation/ValidationTypes.js.map | 1 + .../esm5/validation/ValidationUtils.js | 29 + .../esm5/validation/ValidationUtils.js.map | 1 + .../class-validator/esm5/validation/Validator.js | 68 + .../esm5/validation/Validator.js.map | 1 + .../validation/ValidatorConstraintInterface.js | 3 + .../validation/ValidatorConstraintInterface.js.map | 1 + .../esm5/validation/ValidatorOptions.js | 3 + .../esm5/validation/ValidatorOptions.js.map | 1 + src/node_modules/class-validator/package.json | 91 + .../class-validator/types/container.d.ts | 25 + .../types/decorator/ValidationOptions.d.ts | 25 + .../types/decorator/array/ArrayContains.d.ts | 12 + .../types/decorator/array/ArrayMaxSize.d.ts | 12 + .../types/decorator/array/ArrayMinSize.d.ts | 12 + .../types/decorator/array/ArrayNotContains.d.ts | 12 + .../types/decorator/array/ArrayNotEmpty.d.ts | 12 + .../types/decorator/array/ArrayUnique.d.ts | 12 + .../types/decorator/common/Allow.d.ts | 5 + .../types/decorator/common/Equals.d.ts | 10 + .../types/decorator/common/IsDefined.d.ts | 10 + .../types/decorator/common/IsEmpty.d.ts | 10 + .../types/decorator/common/IsIn.d.ts | 10 + .../types/decorator/common/IsLatLong.d.ts | 10 + .../types/decorator/common/IsLatitude.d.ts | 10 + .../types/decorator/common/IsLongitude.d.ts | 10 + .../types/decorator/common/IsNotEmpty.d.ts | 10 + .../types/decorator/common/IsNotIn.d.ts | 10 + .../types/decorator/common/IsOptional.d.ts | 5 + .../types/decorator/common/NotEquals.d.ts | 10 + .../types/decorator/common/Validate.d.ts | 14 + .../types/decorator/common/ValidateBy.d.ts | 11 + .../types/decorator/common/ValidateIf.d.ts | 5 + .../types/decorator/common/ValidateNested.d.ts | 5 + .../types/decorator/common/ValidatePromise.d.ts | 5 + .../types/decorator/date/MaxDate.d.ts | 10 + .../types/decorator/date/MinDate.d.ts | 10 + .../types/decorator/decorators.d.ts | 106 + .../types/decorator/number/IsDivisibleBy.d.ts | 10 + .../types/decorator/number/IsNegative.d.ts | 10 + .../types/decorator/number/IsPositive.d.ts | 10 + .../types/decorator/number/Max.d.ts | 10 + .../types/decorator/number/Min.d.ts | 10 + .../types/decorator/object/IsInstance.d.ts | 10 + .../types/decorator/object/IsNotEmptyObject.d.ts | 12 + .../types/decorator/string/Contains.d.ts | 12 + .../types/decorator/string/IsAlpha.d.ts | 13 + .../types/decorator/string/IsAlphanumeric.d.ts | 13 + .../types/decorator/string/IsAscii.d.ts | 12 + .../types/decorator/string/IsBIC.d.ts | 12 + .../types/decorator/string/IsBase32.d.ts | 12 + .../types/decorator/string/IsBase64.d.ts | 12 + .../types/decorator/string/IsBooleanString.d.ts | 12 + .../types/decorator/string/IsBtcAddress.d.ts | 12 + .../types/decorator/string/IsByteLength.d.ts | 12 + .../types/decorator/string/IsCreditCard.d.ts | 12 + .../types/decorator/string/IsCurrency.d.ts | 13 + .../types/decorator/string/IsDataURI.d.ts | 12 + .../types/decorator/string/IsDateString.d.ts | 10 + .../types/decorator/string/IsDecimal.d.ts | 13 + .../types/decorator/string/IsEAN.d.ts | 12 + .../types/decorator/string/IsEmail.d.ts | 13 + .../types/decorator/string/IsEthereumAddress.d.ts | 12 + .../types/decorator/string/IsFQDN.d.ts | 13 + .../types/decorator/string/IsFirebasePushId.d.ts | 12 + .../types/decorator/string/IsFullWidth.d.ts | 12 + .../types/decorator/string/IsHSL.d.ts | 14 + .../types/decorator/string/IsHalfWidth.d.ts | 12 + .../types/decorator/string/IsHash.d.ts | 15 + .../types/decorator/string/IsHexColor.d.ts | 12 + .../types/decorator/string/IsHexadecimal.d.ts | 12 + .../types/decorator/string/IsIBAN.d.ts | 12 + .../types/decorator/string/IsIP.d.ts | 13 + .../types/decorator/string/IsISBN.d.ts | 13 + .../types/decorator/string/IsISIN.d.ts | 12 + .../types/decorator/string/IsISO31661Alpha2.d.ts | 10 + .../types/decorator/string/IsISO31661Alpha3.d.ts | 10 + .../types/decorator/string/IsISO8601.d.ts | 15 + .../types/decorator/string/IsISRC.d.ts | 12 + .../types/decorator/string/IsISSN.d.ts | 13 + .../types/decorator/string/IsIdentityCard.d.ts | 17 + .../types/decorator/string/IsJSON.d.ts | 12 + .../types/decorator/string/IsJWT.d.ts | 12 + .../types/decorator/string/IsLocale.d.ts | 12 + .../types/decorator/string/IsLowercase.d.ts | 12 + .../types/decorator/string/IsMacAddress.d.ts | 14 + .../types/decorator/string/IsMagnetURI.d.ts | 12 + .../types/decorator/string/IsMilitaryTime.d.ts | 12 + .../types/decorator/string/IsMimeType.d.ts | 12 + .../types/decorator/string/IsMobilePhone.d.ts | 29 + .../types/decorator/string/IsMongoId.d.ts | 12 + .../types/decorator/string/IsMultibyte.d.ts | 12 + .../types/decorator/string/IsNumberString.d.ts | 13 + .../types/decorator/string/IsOctal.d.ts | 12 + .../types/decorator/string/IsPassportNumber.d.ts | 12 + .../types/decorator/string/IsPhoneNumber.d.ts | 17 + .../types/decorator/string/IsPort.d.ts | 10 + .../types/decorator/string/IsPostalCode.d.ts | 15 + .../types/decorator/string/IsRFC3339.d.ts | 12 + .../types/decorator/string/IsRgbColor.d.ts | 14 + .../types/decorator/string/IsSemVer.d.ts | 12 + .../types/decorator/string/IsSurrogatePair.d.ts | 12 + .../types/decorator/string/IsUUID.d.ts | 13 + .../types/decorator/string/IsUppercase.d.ts | 12 + .../types/decorator/string/IsUrl.d.ts | 13 + .../types/decorator/string/IsVariableWidth.d.ts | 12 + .../types/decorator/string/Length.d.ts | 12 + .../types/decorator/string/Matches.d.ts | 14 + .../types/decorator/string/MaxLength.d.ts | 12 + .../types/decorator/string/MinLength.d.ts | 12 + .../types/decorator/string/NotContains.d.ts | 12 + .../types/decorator/typechecker/IsArray.d.ts | 10 + .../types/decorator/typechecker/IsBoolean.d.ts | 10 + .../types/decorator/typechecker/IsDate.d.ts | 10 + .../types/decorator/typechecker/IsEnum.d.ts | 10 + .../types/decorator/typechecker/IsInt.d.ts | 10 + .../types/decorator/typechecker/IsNumber.d.ts | 18 + .../types/decorator/typechecker/IsObject.d.ts | 12 + .../types/decorator/typechecker/IsString.d.ts | 10 + src/node_modules/class-validator/types/index.d.ts | 47 + .../types/metadata/ConstraintMetadata.d.ts | 23 + .../types/metadata/MetadataStorage.d.ts | 42 + .../types/metadata/ValidationMetadata.d.ts | 49 + .../types/metadata/ValidationMetadataArgs.d.ts | 34 + .../class-validator/types/register-decorator.d.ts | 36 + src/node_modules/class-validator/types/utils.d.ts | 5 + .../types/validation-schema/ValidationSchema.d.ts | 53 + .../ValidationSchemaToMetadataTransformer.d.ts | 8 + .../types/validation/ValidationArguments.d.ts | 26 + .../types/validation/ValidationError.d.ts | 41 + .../types/validation/ValidationExecutor.d.ts | 28 + .../types/validation/ValidationTypes.d.ts | 15 + .../types/validation/ValidationUtils.d.ts | 4 + .../types/validation/Validator.d.ts | 37 + .../validation/ValidatorConstraintInterface.d.ts | 14 + .../types/validation/ValidatorOptions.d.ts | 53 + 640 files changed, 17478 insertions(+) create mode 100644 src/node_modules/class-validator/README.md create mode 100644 src/node_modules/class-validator/bundles/index.esm.js create mode 100644 src/node_modules/class-validator/bundles/index.esm.js.map create mode 100644 src/node_modules/class-validator/bundles/index.esm.min.js create mode 100644 src/node_modules/class-validator/bundles/index.esm.min.js.map create mode 100644 src/node_modules/class-validator/bundles/index.umd.js create mode 100644 src/node_modules/class-validator/bundles/index.umd.js.map create mode 100644 src/node_modules/class-validator/bundles/index.umd.min.js create mode 100644 src/node_modules/class-validator/bundles/index.umd.min.js.map create mode 100644 src/node_modules/class-validator/esm2015/container.js create mode 100644 src/node_modules/class-validator/esm2015/container.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/Allow.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/Allow.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/Equals.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/Equals.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsIn.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsIn.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/Validate.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/Validate.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/date/MinDate.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/date/MinDate.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/decorators.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/decorators.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/Max.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/Max.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/Min.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/number/Min.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/Contains.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/Contains.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHash.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHash.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsIP.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsIP.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPort.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPort.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/Length.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/Length.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/Matches.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/Matches.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/MinLength.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/MinLength.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/NotContains.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/string/NotContains.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js.map create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js create mode 100644 src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js.map create mode 100644 src/node_modules/class-validator/esm2015/index.js create mode 100644 src/node_modules/class-validator/esm2015/index.js.map create mode 100644 src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js create mode 100644 src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js.map create mode 100644 src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js create mode 100644 src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js.map create mode 100644 src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js create mode 100644 src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js.map create mode 100644 src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js create mode 100644 src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js.map create mode 100644 src/node_modules/class-validator/esm2015/register-decorator.js create mode 100644 src/node_modules/class-validator/esm2015/register-decorator.js.map create mode 100644 src/node_modules/class-validator/esm2015/utils.js create mode 100644 src/node_modules/class-validator/esm2015/utils.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js create mode 100644 src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js create mode 100644 src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationArguments.js create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationArguments.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationError.js create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationError.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationTypes.js create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationTypes.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationUtils.js create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidationUtils.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/Validator.js create mode 100644 src/node_modules/class-validator/esm2015/validation/Validator.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js.map create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js create mode 100644 src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js.map create mode 100644 src/node_modules/class-validator/esm5/container.js create mode 100644 src/node_modules/class-validator/esm5/container.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/ValidationOptions.js create mode 100644 src/node_modules/class-validator/esm5/decorator/ValidationOptions.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js create mode 100644 src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/Allow.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/Allow.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/Equals.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/Equals.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsDefined.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsDefined.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsIn.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsIn.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsOptional.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/IsOptional.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/NotEquals.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/NotEquals.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/Validate.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/Validate.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js create mode 100644 src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/date/MaxDate.js create mode 100644 src/node_modules/class-validator/esm5/decorator/date/MaxDate.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/date/MinDate.js create mode 100644 src/node_modules/class-validator/esm5/decorator/date/MinDate.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/decorators.js create mode 100644 src/node_modules/class-validator/esm5/decorator/decorators.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js create mode 100644 src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/number/IsNegative.js create mode 100644 src/node_modules/class-validator/esm5/decorator/number/IsNegative.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/number/IsPositive.js create mode 100644 src/node_modules/class-validator/esm5/decorator/number/IsPositive.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/number/Max.js create mode 100644 src/node_modules/class-validator/esm5/decorator/number/Max.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/number/Min.js create mode 100644 src/node_modules/class-validator/esm5/decorator/number/Min.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/object/IsInstance.js create mode 100644 src/node_modules/class-validator/esm5/decorator/object/IsInstance.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js create mode 100644 src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/Contains.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/Contains.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsAscii.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsAscii.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBIC.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBIC.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBase32.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBase32.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBase64.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBase64.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsDateString.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsDateString.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsEAN.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsEAN.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsEmail.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsEmail.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHSL.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHSL.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHash.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHash.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsIP.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsIP.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISBN.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISBN.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISIN.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISIN.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISRC.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISRC.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISSN.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsISSN.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsJSON.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsJSON.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsJWT.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsJWT.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsLocale.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsLocale.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsOctal.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsOctal.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPort.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPort.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsUUID.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsUUID.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsUrl.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsUrl.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/Length.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/Length.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/Matches.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/Matches.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/MaxLength.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/MaxLength.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/MinLength.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/MinLength.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/string/NotContains.js create mode 100644 src/node_modules/class-validator/esm5/decorator/string/NotContains.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js.map create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js create mode 100644 src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js.map create mode 100644 src/node_modules/class-validator/esm5/index.js create mode 100644 src/node_modules/class-validator/esm5/index.js.map create mode 100644 src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js create mode 100644 src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js.map create mode 100644 src/node_modules/class-validator/esm5/metadata/MetadataStorage.js create mode 100644 src/node_modules/class-validator/esm5/metadata/MetadataStorage.js.map create mode 100644 src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js create mode 100644 src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js.map create mode 100644 src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js create mode 100644 src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js.map create mode 100644 src/node_modules/class-validator/esm5/register-decorator.js create mode 100644 src/node_modules/class-validator/esm5/register-decorator.js.map create mode 100644 src/node_modules/class-validator/esm5/utils.js create mode 100644 src/node_modules/class-validator/esm5/utils.js.map create mode 100644 src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js create mode 100644 src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js.map create mode 100644 src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js create mode 100644 src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationArguments.js create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationArguments.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationError.js create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationError.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationExecutor.js create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationExecutor.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationTypes.js create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationTypes.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationUtils.js create mode 100644 src/node_modules/class-validator/esm5/validation/ValidationUtils.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/Validator.js create mode 100644 src/node_modules/class-validator/esm5/validation/Validator.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js create mode 100644 src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js.map create mode 100644 src/node_modules/class-validator/esm5/validation/ValidatorOptions.js create mode 100644 src/node_modules/class-validator/esm5/validation/ValidatorOptions.js.map create mode 100644 src/node_modules/class-validator/package.json create mode 100644 src/node_modules/class-validator/types/container.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/ValidationOptions.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/array/ArrayContains.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/array/ArrayMaxSize.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/array/ArrayMinSize.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/array/ArrayNotContains.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/array/ArrayNotEmpty.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/array/ArrayUnique.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/Allow.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/Equals.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsDefined.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsEmpty.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsIn.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsLatLong.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsLatitude.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsLongitude.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsNotEmpty.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsNotIn.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/IsOptional.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/NotEquals.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/Validate.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/ValidateBy.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/ValidateIf.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/ValidateNested.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/common/ValidatePromise.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/date/MaxDate.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/date/MinDate.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/decorators.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/number/IsDivisibleBy.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/number/IsNegative.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/number/IsPositive.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/number/Max.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/number/Min.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/object/IsInstance.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/object/IsNotEmptyObject.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/Contains.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsAlpha.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsAlphanumeric.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsAscii.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsBIC.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsBase32.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsBase64.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsBooleanString.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsBtcAddress.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsByteLength.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsCreditCard.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsCurrency.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsDataURI.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsDateString.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsDecimal.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsEAN.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsEmail.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsEthereumAddress.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsFQDN.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsFirebasePushId.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsFullWidth.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsHSL.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsHalfWidth.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsHash.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsHexColor.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsHexadecimal.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsIBAN.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsIP.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsISBN.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsISIN.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha2.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha3.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsISO8601.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsISRC.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsISSN.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsIdentityCard.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsJSON.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsJWT.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsLocale.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsLowercase.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsMacAddress.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsMagnetURI.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsMilitaryTime.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsMimeType.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsMobilePhone.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsMongoId.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsMultibyte.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsNumberString.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsOctal.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsPassportNumber.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsPhoneNumber.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsPort.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsPostalCode.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsRFC3339.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsRgbColor.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsSemVer.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsSurrogatePair.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsUUID.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsUppercase.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsUrl.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/IsVariableWidth.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/Length.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/Matches.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/MaxLength.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/MinLength.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/string/NotContains.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsArray.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsBoolean.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsDate.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsEnum.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsInt.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsNumber.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsObject.d.ts create mode 100644 src/node_modules/class-validator/types/decorator/typechecker/IsString.d.ts create mode 100644 src/node_modules/class-validator/types/index.d.ts create mode 100644 src/node_modules/class-validator/types/metadata/ConstraintMetadata.d.ts create mode 100644 src/node_modules/class-validator/types/metadata/MetadataStorage.d.ts create mode 100644 src/node_modules/class-validator/types/metadata/ValidationMetadata.d.ts create mode 100644 src/node_modules/class-validator/types/metadata/ValidationMetadataArgs.d.ts create mode 100644 src/node_modules/class-validator/types/register-decorator.d.ts create mode 100644 src/node_modules/class-validator/types/utils.d.ts create mode 100644 src/node_modules/class-validator/types/validation-schema/ValidationSchema.d.ts create mode 100644 src/node_modules/class-validator/types/validation-schema/ValidationSchemaToMetadataTransformer.d.ts create mode 100644 src/node_modules/class-validator/types/validation/ValidationArguments.d.ts create mode 100644 src/node_modules/class-validator/types/validation/ValidationError.d.ts create mode 100644 src/node_modules/class-validator/types/validation/ValidationExecutor.d.ts create mode 100644 src/node_modules/class-validator/types/validation/ValidationTypes.d.ts create mode 100644 src/node_modules/class-validator/types/validation/ValidationUtils.d.ts create mode 100644 src/node_modules/class-validator/types/validation/Validator.d.ts create mode 100644 src/node_modules/class-validator/types/validation/ValidatorConstraintInterface.d.ts create mode 100644 src/node_modules/class-validator/types/validation/ValidatorOptions.d.ts (limited to 'src/node_modules/class-validator') diff --git a/src/node_modules/class-validator/README.md b/src/node_modules/class-validator/README.md new file mode 100644 index 0000000..f9456c7 --- /dev/null +++ b/src/node_modules/class-validator/README.md @@ -0,0 +1,1010 @@ +# class-validator + +[![Build Status](https://travis-ci.org/typestack/class-validator.svg?branch=master)](https://travis-ci.org/typestack/class-validator) +[![npm version](https://badge.fury.io/js/class-validator.svg)](https://badge.fury.io/js/class-validator) +[![install size](https://packagephobia.now.sh/badge?p=class-validator)](https://packagephobia.now.sh/result?p=class-validator) +[![Join the chat at https://gitter.im/typestack/class-validator](https://badges.gitter.im/typestack/class-validator.svg)](https://gitter.im/typestack/class-validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +Allows use of decorator and non-decorator based validation. +Internally uses [validator.js][1] to perform validation. +Class-validator works on both browser and node.js platforms. + +## Table of Contents + + * [Installation](#installation) + * [Usage](#usage) + + [Validation errors](#validation-errors) + + [Validation messages](#validation-messages) + + [Validating arrays](#validating-arrays) + + [Validating sets](#validating-sets) + + [Validating maps](#validating-maps) + + [Validating nested objects](#validating-nested-objects) + + [Validating promises](#validating-promises) + + [Inheriting Validation decorators](#inheriting-validation-decorators) + + [Conditional validation](#conditional-validation) + + [Whitelisting](#whitelisting) + + [Passing context to decorators](#passing-context-to-decorators) + + [Skipping missing properties](#skipping-missing-properties) + + [Validation groups](#validation-groups) + + [Custom validation classes](#custom-validation-classes) + + [Custom validation decorators](#custom-validation-decorators) + + [Using service container](#using-service-container) + + [Synchronous validation](#synchronous-validation) + + [Manual validation](#manual-validation) + + [Validation decorators](#validation-decorators) + + [Defining validation schema without decorators](#defining-validation-schema-without-decorators) + + [Validating plain objects](#validating-plain-objects) + * [Samples](#samples) + * [Extensions](#extensions) + * [Release notes](#release-notes) + +## Installation + +``` +npm install class-validator --save +``` + +> Note: Please use at least npm@6 when using class-validator. From npm@6 the dependency tree is flattened, which is required by `class-validator` to function properly. + +## Usage + +Create your class and put some validation decorators on the properties you want to validate: + +```javascript +import {validate, validateOrReject, Contains, IsInt, Length, IsEmail, IsFQDN, IsDate, Min, Max} from "class-validator"; + +export class Post { + + @Length(10, 20) + title: string; + + @Contains("hello") + text: string; + + @IsInt() + @Min(0) + @Max(10) + rating: number; + + @IsEmail() + email: string; + + @IsFQDN() + site: string; + + @IsDate() + createDate: Date; + +} + +let post = new Post(); +post.title = "Hello"; // should not pass +post.text = "this is a great post about hell world"; // should not pass +post.rating = 11; // should not pass +post.email = "google.com"; // should not pass +post.site = "googlecom"; // should not pass + +validate(post).then(errors => { // errors is an array of validation errors + if (errors.length > 0) { + console.log("validation failed. errors: ", errors); + } else { + console.log("validation succeed"); + } +}); + +validateOrReject(post).catch(errors => { + console.log("Promise rejected (validation failed). Errors: ", errors); +}); +// or +async function validateOrRejectExample(input) { + try { + await validateOrReject(input); + } catch (errors) { + console.log("Caught promise rejection (validation failed). Errors: ", errors) + } +} +``` + +### Passing options + +The `validate` function optionally expects a `ValidatorOptions` object as a second parameter: + +```ts +export interface ValidatorOptions { + + skipMissingProperties?: boolean; + whitelist?: boolean; + forbidNonWhitelisted?: boolean; + groups?: string[]; + dismissDefaultMessages?: boolean; + validationError?: { + target?: boolean; + value?: boolean; + }; + + forbidUnknownValues?: boolean; +} +``` + +> It's highly advised to set `forbidUnknownValues: true` as it will prevent unknown objects from passing validation. + +## Validation errors + +The `validate` method returns an array of `ValidationError` objects. Each `ValidationError` is: + +```javascript +{ + target: Object; // Object that was validated. + property: string; // Object's property that haven't pass validation. + value: any; // Value that haven't pass a validation. + constraints?: { // Constraints that failed validation with error messages. + [type: string]: string; + }; + children?: ValidationError[]; // Contains all nested validation errors of the property +} +``` + +In our case, when we validated a Post object, we have such an array of `ValidationError` objects: + +```javascript +[{ + target: /* post object */, + property: "title", + value: "Hello", + constraints: { + length: "$property must be longer than or equal to 10 characters" + } +}, { + target: /* post object */, + property: "text", + value: "this is a great post about hell world", + constraints: { + contains: "text must contain a hello string" + } +}, +// and other errors +] +``` + +If you don't want a `target` to be exposed in validation errors, there is a special option when you use validator: + +```javascript +validator.validate(post, { validationError: { target: false } }); +``` + +This is especially useful when you send errors back over http, and you most probably don't want to expose +the whole target object. + +## Validation messages + +You can specify validation message in the decorator options and that message will be returned in the `ValidationError` +returned by the `validate` method (in the case that validation for this field fails). + +```javascript +import {MinLength, MaxLength} from "class-validator"; + +export class Post { + + @MinLength(10, { + message: "Title is too short" + }) + @MaxLength(50, { + message: "Title is too long" + }) + title: string; +} +``` + +There are few special tokens you can use in your messages: +* `$value` - the value that is being validated +* `$property` - name of the object's property being validated +* `$target` - name of the object's class being validated +* `$constraint1`, `$constraint2`, ... `$constraintN` - constraints defined by specific validation type + +Example of usage: + +```javascript +import {MinLength, MaxLength} from "class-validator"; + +export class Post { + + @MinLength(10, { // here, $constraint1 will be replaced with "10", and $value with actual supplied value + message: "Title is too short. Minimal length is $constraint1 characters, but actual is $value" + }) + @MaxLength(50, { // here, $constraint1 will be replaced with "50", and $value with actual supplied value + message: "Title is too long. Maximal length is $constraint1 characters, but actual is $value" + }) + title: string; +} +``` + +Also you can provide a function, that returns a message. This allows you to create more granular messages: + +```javascript +import {MinLength, MaxLength, ValidationArguments} from "class-validator"; + +export class Post { + + @MinLength(10, { + message: (args: ValidationArguments) => { + if (args.value.length === 1) { + return "Too short, minimum length is 1 character"; + } else { + return "Too short, minimum length is " + args.constraints[0] + " characters"; + } + } + }) + title: string; +} +``` + +Message function accepts `ValidationArguments` which contains the following information: +* `value` - the value that is being validated +* `constraints` - array of constraints defined by specific validation type +* `targetName` - name of the object's class being validated +* `object` - object that is being validated +* `property` - name of the object's property being validated + +## Validating arrays + +If your field is an array and you want to perform validation of each item in the array you must specify a +special `each: true` decorator option: + +```javascript +import {MinLength, MaxLength} from "class-validator"; + +export class Post { + + @MaxLength(20, { + each: true + }) + tags: string[]; +} +``` + +This will validate each item in `post.tags` array. + +## Validating sets + +If your field is a set and you want to perform validation of each item in the set you must specify a +special `each: true` decorator option: + +```javascript +import {MinLength, MaxLength} from "class-validator"; + +export class Post { + + @MaxLength(20, { + each: true + }) + tags: Set; +} +``` + +This will validate each item in `post.tags` set. + +## Validating maps + +If your field is a map and you want to perform validation of each item in the map you must specify a +special `each: true` decorator option: + +```javascript +import {MinLength, MaxLength} from "class-validator"; + +export class Post { + + @MaxLength(20, { + each: true + }) + tags: Map; +} +``` + +This will validate each item in `post.tags` map. + +## Validating nested objects + +If your object contains nested objects and you want the validator to perform their validation too, then you need to +use the `@ValidateNested()` decorator: + +```javascript +import {ValidateNested} from "class-validator"; + +export class Post { + + @ValidateNested() + user: User; + +} +``` + +Please note that nested object *must* be an instance of a class, otherwise `@ValidateNested` won't know what class is target of validation. Check also [Validating plain objects](#validating-plain-objects). + +It also works with multi-dimensional array, like : + +```javascript +import {ValidateNested} from "class-validator"; + +export class Plan2D { + + @ValidateNested() + matrix: Point[][]; + +} +``` + +## Validating promises + +If your object contains property with `Promise`-returned value that should be validated, then you need to use the `@ValidatePromise()` decorator: + +```javascript +import {ValidatePromise, Min} from "class-validator"; + +export class Post { + + @Min(0) + @ValidatePromise() + userId: Promise; + +} +``` + +It also works great with `@ValidateNested` decorator: + +```javascript +import {ValidateNested, ValidatePromise} from "class-validator"; + +export class Post { + + @ValidateNested() + @ValidatePromise() + user: Promise; + +} +``` + +## Inheriting Validation decorators + +When you define a subclass which extends from another one, the subclass will automatically inherit the parent's decorators. If a property is redefined in the descendant class decorators will be applied on it both from that and the base class. + +```javascript +import {validate} from "class-validator"; + +class BaseContent { + + @IsEmail() + email: string; + + @IsString() + password: string; +} + +class User extends BaseContent { + + @MinLength(10) + @MaxLength(20) + name: string; + + @Contains("hello") + welcome: string; + + @MinLength(20) + password: string; +} + +let user = new User(); + +user.email = "invalid email"; // inherited property +user.password = "too short" // password wil be validated not only against IsString, but against MinLength as well +user.name = "not valid"; +user.welcome = "helo"; + +validate(user).then(errors => { + // ... +}); // it will return errors for email, title and text properties + +``` + +## Conditional validation + +The conditional validation decorator (`@ValidateIf`) can be used to ignore the validators on a property when the provided condition function returns false. The condition function takes the object being validated and must return a `boolean`. + +```javascript +import {ValidateIf, IsNotEmpty} from "class-validator"; + +export class Post { + otherProperty:string; + + @ValidateIf(o => o.otherProperty === "value") + @IsNotEmpty() + example:string; +} +``` + +In the example above, the validation rules applied to `example` won't be run unless the object's `otherProperty` is `"value"`. + +Note that when the condition is false all validation decorators are ignored, including `isDefined`. + +## Whitelisting + +Even if your object is an instance of a validation class it can contain additional properties that are not defined. +If you do not want to have such properties on your object, pass special flag to `validate` method: + +```javascript +import {validate} from "class-validator"; +// ... +validate(post, { whitelist: true }); +``` + +This will strip all properties that don't have any decorators. If no other decorator is suitable for your property, +you can use @Allow decorator: + +```javascript +import {validate, Allow, Min} from "class-validator"; + +export class Post { + + @Allow() + title: string; + + @Min(0) + views: number; + + nonWhitelistedProperty: number; +} + +let post = new Post(); +post.title = 'Hello world!'; +post.views = 420; + +post.nonWhitelistedProperty = 69; +(post as any).anotherNonWhitelistedProperty = "something"; + +validate(post).then(errors => { + // post.nonWhitelistedProperty is not defined + // (post as any).anotherNonWhitelistedProperty is not defined + ... +}); +```` + +If you would rather to have an error thrown when any non-whitelisted properties are present, pass another flag to +`validate` method: + +```javascript +import {validate} from "class-validator"; +// ... +validate(post, { whitelist: true, forbidNonWhitelisted: true }); +``` + +## Passing context to decorators + +It's possible to pass a custom object to decorators which will be accessible on the `ValidationError` instance of the property if validation failed. + +```ts +import { validate } from 'class-validator'; + +class MyClass { + @MinLength(32, { + message: "EIC code must be at least 32 characters", + context: { + errorCode: 1003, + developerNote: "The validated string must contain 32 or more characters." + } + }) + eicCode: string; +} + +const model = new MyClass(); + +validate(model).then(errors => { + //errors[0].contexts['minLength'].errorCode === 1003 +}); +``` + +## Skipping missing properties + +Sometimes you may want to skip validation of the properties that do not exist in the validating object. This is +usually desirable when you want to update some parts of the object, and want to validate only updated parts, +but skip everything else, e.g. skip missing properties. +In such situations you will need to pass a special flag to `validate` method: + +```javascript +import {validate} from "class-validator"; +// ... +validate(post, { skipMissingProperties: true }); +``` + +When skipping missing properties, sometimes you want not to skip all missing properties, some of them maybe required +for you, even if skipMissingProperties is set to true. For such cases you should use `@IsDefined()` decorator. +`@IsDefined()` is the only decorator that ignores `skipMissingProperties` option. + +## Validation groups + +In different situations you may want to use different validation schemas of the same object. + In such cases you can use validation groups. + +```javascript +import {validate, Min, Length} from "class-validator"; + +export class User { + + @Min(12, { + groups: ["registration"] + }) + age: number; + + @Length(2, 20, { + groups: ["registration", "admin"] + }) + name: string; +} + +let user = new User(); +user.age = 10; +user.name = "Alex"; + +validate(user, { + groups: ["registration"] +}); // this will not pass validation + +validate(user, { + groups: ["admin"] +}); // this will pass validation + +validate(user, { + groups: ["registration", "admin"] +}); // this will not pass validation + +validate(user, { + groups: undefined // the default +}); // this will not pass validation since all properties get validated regardless of their groups + +validate(user, { + groups: [] +}); // this will not pass validation, (equivalent to 'groups: undefined', see above) +``` + +There is also a special flag `always: true` in validation options that you can use. This flag says that this validation +must be applied always no matter which group is used. + +## Custom validation classes + +If you have custom validation logic you can create a *Constraint class*: + +1. First create a file, lets say `CustomTextLength.ts`, and define a new class: + + ```javascript + import {ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments} from "class-validator"; + + @ValidatorConstraint({ name: "customText", async: false }) + export class CustomTextLength implements ValidatorConstraintInterface { + + validate(text: string, args: ValidationArguments) { + return text.length > 1 && text.length < 10; // for async validations you must return a Promise here + } + + defaultMessage(args: ValidationArguments) { // here you can provide default error message if validation failed + return "Text ($value) is too short or too long!"; + } + + } + ``` + + We marked our class with `@ValidatorConstraint` decorator. + You can also supply a validation constraint name - this name will be used as "error type" in ValidationError. + If you will not supply a constraint name - it will be auto-generated. + + Our class must implement `ValidatorConstraintInterface` interface and its `validate` method, + which defines validation logic. If validation succeeds, method returns true, otherwise false. + Custom validator can be asynchronous, if you want to perform validation after some asynchronous + operations, simply return a promise with boolean inside in `validate` method. + + Also we defined optional method `defaultMessage` which defines a default error message, + in the case that the decorator's implementation doesn't set an error message. + + +2. Then you can use your new validation constraint in your class: + + ```javascript + import {Validate} from "class-validator"; + import {CustomTextLength} from "./CustomTextLength"; + + export class Post { + + @Validate(CustomTextLength, { + message: "Title is too short or long!" + }) + title: string; + + } + ``` + + Here we set our newly created `CustomTextLength` validation constraint for `Post.title`. + +3. And use validator as usual: + + ```javascript + import {validate} from "class-validator"; + + validate(post).then(errors => { + // ... + }); + ``` + +You can also pass constraints to your validator, like this: + +```javascript +import {Validate} from "class-validator"; +import {CustomTextLength} from "./CustomTextLength"; + +export class Post { + + @Validate(CustomTextLength, [3, 20], { + message: "Wrong post title" + }) + title: string; + +} +``` + +And use them from `validationArguments` object: + +```javascript +import {ValidationArguments, ValidatorConstraint, ValidatorConstraintInterface} from "class-validator"; + +@ValidatorConstraint() +export class CustomTextLength implements ValidatorConstraintInterface { + + validate(text: string, validationArguments: ValidationArguments) { + return text.length > validationArguments.constraints[0] && text.length < validationArguments.constraints[1]; + } + +} +``` + +## Custom validation decorators + +You can also create a custom decorators. Its the most elegant way of using a custom validations. +Lets create a decorator called `@IsLongerThan`: + +1. Create a decorator itself: + + ```javascript + import {registerDecorator, ValidationOptions, ValidationArguments} from "class-validator"; + + export function IsLongerThan(property: string, validationOptions?: ValidationOptions) { + return function (object: Object, propertyName: string) { + registerDecorator({ + name: "isLongerThan", + target: object.constructor, + propertyName: propertyName, + constraints: [property], + options: validationOptions, + validator: { + validate(value: any, args: ValidationArguments) { + const [relatedPropertyName] = args.constraints; + const relatedValue = (args.object as any)[relatedPropertyName]; + return typeof value === "string" && + typeof relatedValue === "string" && + value.length > relatedValue.length; // you can return a Promise here as well, if you want to make async validation + } + } + }); + }; + } + ``` + +2. Put it to use: + + ```javascript + import {IsLongerThan} from "./IsLongerThan"; + + export class Post { + + title: string; + + @IsLongerThan("title", { + /* you can also use additional validation options, like "groups" in your custom validation decorators. "each" is not supported */ + message: "Text must be longer than the title" + }) + text: string; + + } + ``` + +In your custom decorators you can also use `ValidationConstraint`. +Lets create another custom validation decorator called `IsUserAlreadyExist`: + +1. Create a ValidationConstraint and decorator: + + ```javascript + import {registerDecorator, ValidationOptions, ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments} from "class-validator"; + + @ValidatorConstraint({ async: true }) + export class IsUserAlreadyExistConstraint implements ValidatorConstraintInterface { + + validate(userName: any, args: ValidationArguments) { + return UserRepository.findOneByName(userName).then(user => { + if (user) return false; + return true; + }); + } + + } + + export function IsUserAlreadyExist(validationOptions?: ValidationOptions) { + return function (object: Object, propertyName: string) { + registerDecorator({ + target: object.constructor, + propertyName: propertyName, + options: validationOptions, + constraints: [], + validator: IsUserAlreadyExistConstraint + }); + }; + } + ``` + + note that we marked our constraint that it will by async by adding `{ async: true }` in validation options. + +2. And put it to use: + + ```javascript + import {IsUserAlreadyExist} from "./IsUserAlreadyExist"; + + export class User { + + @IsUserAlreadyExist({ + message: "User $value already exists. Choose another name." + }) + name: string; + + } + ``` + +## Using service container + +Validator supports service container in the case if want to inject dependencies into your custom validator constraint +classes. Here is example how to integrate it with [typedi][2]: + +```javascript +import {Container} from "typedi"; +import {useContainer, Validator} from "class-validator"; + +// do this somewhere in the global application level: +useContainer(Container); +let validator = Container.get(Validator); + +// now everywhere you can inject Validator class which will go from the container +// also you can inject classes using constructor injection into your custom ValidatorConstraint-s +``` + +## Synchronous validation + +If you want to perform a simple non async validation you can use `validateSync` method instead of regular `validate` + method. It has the same arguments as `validate` method. But note, this method **ignores** all async validations + you have. + +## Manual validation + +There are several method exist in the Validator that allows to perform non-decorator based validation: + +```javascript +import {isEmpty, isBoolean} from "class-validator"; + +isEmpty(value); +isBoolean(value); +``` + +## Validation decorators + +| Decorator | Description | +|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------| +| **Common validation decorators** | +| `@IsDefined(value: any)` | Checks if value is defined (!== undefined, !== null). This is the only decorator that ignores skipMissingProperties option. | +| `@IsOptional()` | Checks if given value is empty (=== null, === undefined) and if so, ignores all the validators on the property. | +| `@Equals(comparison: any)` | Checks if value equals ("===") comparison. | +| `@NotEquals(comparison: any)` | Checks if value not equal ("!==") comparison. | +| `@IsEmpty()` | Checks if given value is empty (=== '', === null, === undefined). | +| `@IsNotEmpty()` | Checks if given value is not empty (!== '', !== null, !== undefined). | +| `@IsIn(values: any[])` | Checks if value is in a array of allowed values. | +| `@IsNotIn(values: any[])` | Checks if value is not in a array of disallowed values. | +| **Type validation decorators** | +| `@IsBoolean()` | Checks if a value is a boolean. | +| `@IsDate()` | Checks if the value is a date. | +| `@IsString()` | Checks if the string is a string. | +| `@IsNumber(options: IsNumberOptions)` | Checks if the value is a number. | +| `@IsInt()` | Checks if the value is an integer number. | +| `@IsArray()` | Checks if the value is an array | +| `@IsEnum(entity: object)` | Checks if the value is an valid enum | +| **Number validation decorators** | +| `@IsDivisibleBy(num: number)` | Checks if the value is a number that's divisible by another. | +| `@IsPositive()` | Checks if the value is a positive number greater than zero. | +| `@IsNegative()` | Checks if the value is a negative number smaller than zero. | +| `@Min(min: number)` | Checks if the given number is greater than or equal to given number. | +| `@Max(max: number)` | Checks if the given number is less than or equal to given number. | +| **Date validation decorators** | +| `@MinDate(date: Date)` | Checks if the value is a date that's after the specified date. | +| `@MaxDate(date: Date)` | Checks if the value is a date that's before the specified date. | | +| **String-type validation decorators** | +| `@IsBooleanString()` | Checks if a string is a boolean (e.g. is "true" or "false"). | +| `@IsDateString()` | Checks if a string is a complete representation of a date (e.g. "2017-06-07T14:34:08.700Z", "2017-06-07T14:34:08.700 or "2017-06-07T14:34:08+04:00"). | +| `@IsNumberString(options?: IsNumericOptions)` | Checks if a string is a number. | +| **String validation decorators** | +| `@Contains(seed: string)` | Checks if the string contains the seed. | +| `@NotContains(seed: string)` | Checks if the string not contains the seed. | +| `@IsAlpha()` | Checks if the string contains only letters (a-zA-Z). | +| `@IsAlphanumeric()` | Checks if the string contains only letters and numbers. +| `@IsDecimal(options?: IsDecimalOptions)` | Checks if the string is a valid decimal value. Default IsDecimalOptions are `force_decimal=False`, `decimal_digits: '1,'`, `locale: 'en-US',` | +| `@IsAscii()` | Checks if the string contains ASCII chars only. | +| `@IsBase32()` | Checks if a string is base32 encoded. | +| `@IsBase64()` | Checks if a string is base64 encoded. | +| `@IsIBAN()` | Checks if a string is a IBAN (International Bank Account Number). | +| `@IsBIC()` | Checks if a string is a BIC (Bank Identification Code) or SWIFT code. | +| `@IsByteLength(min: number, max?: number)` | Checks if the string's length (in bytes) falls in a range. | +| `@IsCreditCard()` | Checks if the string is a credit card. | +| `@IsCurrency(options?: IsCurrencyOptions)` | Checks if the string is a valid currency amount. | +| `@IsEthereumAddress()` | Checks if the string is an Ethereum address using basic regex. Does not validate address checksums. | +| `@IsBtcAddress()` | Checks if the string is a valid BTC address. | +| `@IsDataURI()` | Checks if the string is a data uri format. | +| `@IsEmail(options?: IsEmailOptions)` | Checks if the string is an email. | +| `@IsFQDN(options?: IsFQDNOptions)` | Checks if the string is a fully qualified domain name (e.g. domain.com). | +| `@IsFullWidth()` | Checks if the string contains any full-width chars. | +| `@IsHalfWidth()` | Checks if the string contains any half-width chars. | +| `@IsVariableWidth()` | Checks if the string contains a mixture of full and half-width chars. | +| `@IsHexColor()` | Checks if the string is a hexadecimal color. | +| `@IsHSLColor()` | Checks if the string is an HSL (hue, saturation, lightness, optional alpha) color based on [CSS Colors Level 4 specification](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value). | +| `@IsRgbColor(options?: IsRgbOptions)` | Checks if the string is a rgb or rgba color. | +| `@IsIdentityCard(locale?: string)` | Checks if the string is a valid identity card code. | +| `@IsPassportNumber(countryCode?: string)` | Checks if the string is a valid passport number relative to a specific country code. | +| `@IsPostalCode(locale?: string)` | Checks if the string is a postal code. | +| `@IsHexadecimal()` | Checks if the string is a hexadecimal number. | +| `@IsOctal()` | Checks if the string is a octal number. | +| `@IsMACAddress(options?: IsMACAddressOptions)` | Checks if the string is a MAC Address. | +| `@IsIP(version?: "4"\|"6")` | Checks if the string is an IP (version 4 or 6). | +| `@IsPort()` | Check if the string is a valid port number. | +| `@IsISBN(version?: "10"\|"13")` | Checks if the string is an ISBN (version 10 or 13). | +| `@IsEAN()` | Checks if the string is an if the string is an EAN (European Article Number). | +| `@IsISIN()` | Checks if the string is an ISIN (stock/security identifier). | +| `@IsISO8601(options?: IsISO8601Options)` | Checks if the string is a valid ISO 8601 date. Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. | +| `@IsJSON()` | Checks if the string is valid JSON. | +| `@IsJWT()` | Checks if the string is valid JWT. | +| `@IsObject()` | Checks if the object is valid Object (null, functions, arrays will return false). | +| `@IsNotEmptyObject()` | Checks if the object is not empty. | +| `@IsLowercase()` | Checks if the string is lowercase. | +| `@IsLatLong()` | Checks if the string is a valid latitude-longitude coordinate in the format lat,long | +| `@IsLatitude()` | Checks if the string or number is a valid latitude coordinate | +| `@IsLongitude()` | Checks if the string or number is a valid longitude coordinate | +| `@IsMobilePhone(locale: string)` | Checks if the string is a mobile phone number. | +| `@IsISO31661Alpha2()` | Checks 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. | +| `@IsISO31661Alpha3()` | Checks 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. | +| `@IsLocale()` | Checks if the string is a locale. | +| `@IsPhoneNumber(region: string)` | Checks if the string is a valid phone number. "region" accepts 2 characters uppercase country code (e.g. DE, US, CH).If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github](https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33) | +| `@IsMongoId()` | Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. | +| `@IsMultibyte()` | Checks if the string contains one or more multibyte chars. | +| `@IsNumberString(options?: IsNumericOptions)` | Checks if the string is numeric. | +| `@IsSurrogatePair()` | Checks if the string contains any surrogate pairs chars. | +| `@IsUrl(options?: IsURLOptions)` | Checks if the string is an url. | +| `@IsMagnetURI()` | Checks if the string is a [magnet uri format](https://en.wikipedia.org/wiki/Magnet_URI_scheme). | +| `@IsUUID(version?: "3"\|"4"\|"5"\|"all")` | Checks if the string is a UUID (version 3, 4, 5 or all ). | +| `@IsFirebasePushId()` | Checks if the string is a [Firebase Push id](https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html) | +| `@IsUppercase()` | Checks if the string is uppercase. | +| `@Length(min: number, max?: number)` | Checks if the string's length falls in a range. | +| `@MinLength(min: number)` | Checks if the string's length is not less than given number. | +| `@MaxLength(max: number)` | Checks if the string's length is not more than given number. | +| `@Matches(pattern: RegExp, modifiers?: string)` | Checks if string matches the pattern. Either matches('foo', /foo/i) or matches('foo', 'foo', 'i'). +| `@IsMilitaryTime()` | Checks if the string is a valid representation of military time in the format HH:MM. | +| `@IsHash(algorithm: string)` | Checks if the string is a hash of type algorithm.

Algorithm is one of `['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b']` | +| `@IsMimeType()` | Checks if the string matches to a valid [MIME type](https://en.wikipedia.org/wiki/Media_type) format | +| `@IsSemVer()` | Checks if the string is a Semantic Versioning Specification (SemVer). | +| `@IsISSN(options?: IsISSNOptions)` | Checks if the string is a ISSN. | +| `@IsISRC()` | Checks if the string is a [ISRC](https://en.wikipedia.org/wiki/International_Standard_Recording_Code). | +| `@IsRFC3339()` | Checks f the string is a valid [RFC 3339](https://tools.ietf.org/html/rfc3339) date. | +| **Array validation decorators** | +| `@ArrayContains(values: any[])` | Checks if array contains all values from the given array of values. | +| `@ArrayNotContains(values: any[])` | Checks if array does not contain any of the given values. | +| `@ArrayNotEmpty()` | Checks if given array is not empty. | +| `@ArrayMinSize(min: number)` | Checks if array's length is as minimal this number. | +| `@ArrayMaxSize(max: number)` | Checks if array's length is as maximal this number. | +| `@ArrayUnique()` | Checks if all array's values are unique. Comparison for objects is reference-based. | +| **Object validation decorators** | +| `@IsInstance(value: any)` | Checks if the property is an instance of the passed value. | + **Other decorators** | +| `@Allow()` | Prevent stripping off the property when no other constraint is specified for it. | + +## Defining validation schema without decorators + +You can define your validation schemas without decorators: + +* you can define it in the separate object +* you can define it in the `.json` file + +This feature maybe useful in the cases if: + +* are using es5/es6 and don't have decorators available +* you don't have a classes, and instead using interfaces +* you don't want to use model at all +* you want to have a validation schema separate of your model +* you want beautiful json-schema based validation models +* you simply hate decorators + +Here is an example of using it: + +1. Create a schema object: + + ```javascript + import {ValidationSchema} from "class-validator"; + export let UserValidationSchema: ValidationSchema = { // using interface here is not required, its just for type-safety + name: "myUserSchema", // this is required, and must be unique + properties: { + firstName: [{ + type: "minLength", // validation type. All validation types are listed in ValidationTypes class. + constraints: [2] + }, { + type: "maxLength", + constraints: [20] + }], + lastName: [{ + type: "minLength", + constraints: [2] + }, { + type: "maxLength", + constraints: [20] + }], + email: [{ + type: "isEmail" + }] + } + }; + ``` + + Same schema can be provided in `.json` file, depend on your wish. + +2. Register your schema: + + ```javascript + import {registerSchema} from "class-validator"; + import {UserValidationSchema} from "./UserValidationSchema"; + registerSchema(UserValidationSchema); // if schema is in .json file, then you can simply do registerSchema(require("path-to-schema.json")); + ``` + + Better to put this code in a global place, maybe when you bootstrap your application, for example in `app.ts`. + +3. Validate your object using validation schema: + + ```javascript + import {validate} from "class-validator"; + const user = { firstName: "Johny", secondName: "Cage", email: "johny@cage.com" }; + validate("myUserSchema", user).then(errors => { + if (errors.length > 0) { + console.log("Validation failed: ", errors); + } else { + console.log("Validation succeed."); + } + }); + ``` + + That's it. Here `"myUserSchema"` is the name of our validation schema. + `validate` method will perform validation based on this schema + +## Validating plain objects +Due to nature of the decorators, the validated object has to be instantiated using `new Class()` syntax. If you have your class defined using class-validator decorators and you want to validate plain JS object (literal object or returned by JSON.parse), you need to transform it to the class instance (e.g. using [class-transformer](https://github.com/pleerock/class-transformer)) or just use the [class-transformer-validator](https://github.com/19majkel94/class-transformer-validator) extension which can do that for you. + +## Samples + +Take a look on samples in [./sample](https://github.com/pleerock/class-validator/tree/master/sample) for more examples of +usages. + +## Extensions +There are several extensions that simplify class-validator integration with other modules: +- [class-validator integration](https://github.com/19majkel94/class-transformer-validator) with [class-transformer](https://github.com/pleerock/class-transformer) +- [class-validator-rule](https://github.com/yantrab/class-validator-rule) +- [ngx-dynamic-form-builder](https://github.com/EndyKaufman/ngx-dynamic-form-builder) + +## Release notes + +See information about breaking changes and release notes [here][3]. + +[1]: https://github.com/chriso/validator.js +[2]: https://github.com/pleerock/typedi +[3]: CHANGELOG.md diff --git a/src/node_modules/class-validator/bundles/index.esm.js b/src/node_modules/class-validator/bundles/index.esm.js new file mode 100644 index 0000000..df913e1 --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.esm.js @@ -0,0 +1,3197 @@ +import validator from 'validator'; +import { PhoneNumberUtil } from 'google-libphonenumber'; + +/** + * This metadata contains validation rules. + */ +class ValidationMetadata { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(args) { + /** + * Validation groups used for this validation. + */ + this.groups = []; + /** + * Indicates if validation must be performed always, no matter of validation groups used. + */ + this.always = false; + /** + * Specifies if validated value is an array and each of its item must be validated. + */ + this.each = false; + /* + * A transient set of data passed through to the validation result for response mapping + */ + this.context = undefined; + this.type = args.type; + this.target = args.target; + this.propertyName = args.propertyName; + this.constraints = args.constraints; + this.constraintCls = args.constraintCls; + this.validationTypeOptions = args.validationTypeOptions; + if (args.validationOptions) { + this.message = args.validationOptions.message; + this.groups = args.validationOptions.groups; + this.always = args.validationOptions.always; + this.each = args.validationOptions.each; + this.context = args.validationOptions.context; + } + } +} + +/** + * Used to transform validation schemas to validation metadatas. + */ +class ValidationSchemaToMetadataTransformer { + transform(schema) { + const metadatas = []; + Object.keys(schema.properties).forEach(property => { + schema.properties[property].forEach(validation => { + const validationOptions = { + message: validation.message, + groups: validation.groups, + always: validation.always, + each: validation.each + }; + const args = { + type: validation.type, + target: schema.name, + propertyName: property, + constraints: validation.constraints, + validationTypeOptions: validation.options, + validationOptions: validationOptions + }; + metadatas.push(new ValidationMetadata(args)); + }); + }); + return metadatas; + } +} + +/** + * Gets metadata storage. + * Metadata storage follows the best practices and stores metadata in a global variable. + */ +function getMetadataStorage() { + if (typeof window !== "undefined") { + window.global = window; + } + if (!global.classValidatorMetadataStorage) + global.classValidatorMetadataStorage = new MetadataStorage(); + return global.classValidatorMetadataStorage; +} +/** + * Storage all metadatas. + */ +class MetadataStorage { + constructor() { + // ------------------------------------------------------------------------- + // Private properties + // ------------------------------------------------------------------------- + this.validationMetadatas = []; + this.constraintMetadatas = []; + } + get hasValidationMetaData() { + return !!this.validationMetadatas.length; + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + /** + * Adds a new validation metadata. + */ + addValidationSchema(schema) { + const validationMetadatas = new ValidationSchemaToMetadataTransformer().transform(schema); + validationMetadatas.forEach(validationMetadata => this.addValidationMetadata(validationMetadata)); + } + /** + * Adds a new validation metadata. + */ + addValidationMetadata(metadata) { + this.validationMetadatas.push(metadata); + } + /** + * Adds a new constraint metadata. + */ + addConstraintMetadata(metadata) { + this.constraintMetadatas.push(metadata); + } + /** + * Groups metadata by their property names. + */ + groupByPropertyName(metadata) { + const grouped = {}; + metadata.forEach(metadata => { + if (!grouped[metadata.propertyName]) + grouped[metadata.propertyName] = []; + grouped[metadata.propertyName].push(metadata); + }); + return grouped; + } + /** + * Gets all validation metadatas for the given object with the given groups. + */ + getTargetValidationMetadatas(targetConstructor, targetSchema, groups) { + // get directly related to a target metadatas + const originalMetadatas = this.validationMetadatas.filter(metadata => { + if (metadata.target !== targetConstructor && metadata.target !== targetSchema) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(group => groups.indexOf(group) !== -1); + return true; + }); + // get metadatas for inherited classes + const inheritedMetadatas = this.validationMetadatas.filter(metadata => { + // if target is a string it's means we validate agains a schema, and there is no inheritance support for schemas + if (typeof metadata.target === "string") + return false; + if (metadata.target === targetConstructor) + return false; + if (metadata.target instanceof Function && + !(targetConstructor.prototype instanceof metadata.target)) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(group => groups.indexOf(group) !== -1); + return true; + }); + // filter out duplicate metadatas, prefer original metadatas instead of inherited metadatas + const uniqueInheritedMetadatas = inheritedMetadatas.filter(inheritedMetadata => { + return !originalMetadatas.find(originalMetadata => { + return originalMetadata.propertyName === inheritedMetadata.propertyName && + originalMetadata.type === inheritedMetadata.type; + }); + }); + return originalMetadatas.concat(uniqueInheritedMetadatas); + } + /** + * Gets all validator constraints for the given object. + */ + getTargetValidatorConstraints(target) { + return this.constraintMetadatas.filter(metadata => metadata.target === target); + } +} + +/** + * Validation error description. + */ +class ValidationError { + /** + * + * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability + * @param hasParent true when the error is a child of an another one + * @param parentPath path as string to the parent of this property + */ + toString(shouldDecorate = false, hasParent = false, parentPath = ``) { + const boldStart = shouldDecorate ? `\x1b[1m` : ``; + const boldEnd = shouldDecorate ? `\x1b[22m` : ``; + const propConstraintFailed = (propertyName) => ` - property ${boldStart}${parentPath}${propertyName}${boldEnd} has failed the following constraints: ${boldStart}${Object.keys(this.constraints).join(`, `)}${boldEnd} \n`; + if (!hasParent) { + return `An instance of ${boldStart}${this.target ? this.target.constructor.name : "an object"}${boldEnd} has failed the validation:\n` + + (this.constraints ? propConstraintFailed(this.property) : ``) + + this.children + .map(childError => childError.toString(shouldDecorate, true, this.property)) + .join(``); + } + else { + // we format numbers as array indexes for better readability. + const formattedProperty = Number.isInteger(+this.property) ? `[${this.property}]` : `${parentPath ? `.` : ``}${this.property}`; + if (this.constraints) { + return propConstraintFailed(formattedProperty); + } + else { + return this.children + .map(childError => childError.toString(shouldDecorate, true, `${parentPath}${formattedProperty}`)) + .join(``); + } + } + } +} + +/** + * Validation types. + */ +class ValidationTypes { + /** + * Checks if validation type is valid. + */ + static isValid(type) { + return type !== "isValid" && + type !== "getMessage" && + Object.keys(this).map(key => this[key]).indexOf(type) !== -1; + } +} +/* system */ +ValidationTypes.CUSTOM_VALIDATION = "customValidation"; // done +ValidationTypes.NESTED_VALIDATION = "nestedValidation"; // done +ValidationTypes.PROMISE_VALIDATION = "promiseValidation"; // done +ValidationTypes.CONDITIONAL_VALIDATION = "conditionalValidation"; // done +ValidationTypes.WHITELIST = "whitelistValidation"; // done +ValidationTypes.IS_DEFINED = "isDefined"; // done + +class ValidationUtils { + static replaceMessageSpecialTokens(message, validationArguments) { + let messageString; + if (message instanceof Function) { + messageString = message(validationArguments); + } + else if (typeof message === "string") { + messageString = message; + } + if (messageString && validationArguments.constraints instanceof Array) { + validationArguments.constraints.forEach((constraint, index) => { + messageString = messageString.replace(new RegExp(`\\$constraint${index + 1}`, "g"), constraint); + }); + } + if (messageString && validationArguments.value !== undefined && validationArguments.value !== null && typeof validationArguments.value === "string") + messageString = messageString.replace(/\$value/g, validationArguments.value); + if (messageString) + messageString = messageString.replace(/\$property/g, validationArguments.property); + if (messageString) + messageString = messageString.replace(/\$target/g, validationArguments.targetName); + return messageString; + } +} + +// https://github.com/TylorS/typed-is-promise/blob/abf1514e1b6961adfc75765476b0debb96b2c3ae/src/index.ts +function isPromise(p) { + return p !== null && typeof p === "object" && typeof p.then === "function"; +} +/** + * Convert Map, Set to Array + */ +function convertToArray(val) { + if (val instanceof Map) { + return Array.from(val.values()); + } + return Array.isArray(val) ? val : Array.from(val); +} + +/** + * Executes validation over given object. + */ +class ValidationExecutor { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(validator, validatorOptions) { + this.validator = validator; + this.validatorOptions = validatorOptions; + // ------------------------------------------------------------------------- + // Properties + // ------------------------------------------------------------------------- + this.awaitingPromises = []; + this.ignoreAsyncValidations = false; + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + this.metadataStorage = getMetadataStorage(); + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + execute(object, targetSchema, validationErrors) { + /** + * If there is no metadata registered it means possibly the dependencies are not flatterned and + * more than one instance is used. + * + * TODO: This needs proper handling, forcing to use the same container or some other proper solution. + */ + if (!this.metadataStorage.hasValidationMetaData) { + console.warn(`No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies.`); + } + const groups = this.validatorOptions ? this.validatorOptions.groups : undefined; + const targetMetadatas = this.metadataStorage.getTargetValidationMetadatas(object.constructor, targetSchema, groups); + const groupedMetadatas = this.metadataStorage.groupByPropertyName(targetMetadatas); + if (this.validatorOptions && this.validatorOptions.forbidUnknownValues && !targetMetadatas.length) { + const validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + validationError.value = undefined; + validationError.property = undefined; + validationError.children = []; + validationError.constraints = { unknownValue: "an unknown value was passed to the validate function" }; + validationErrors.push(validationError); + return; + } + if (this.validatorOptions && this.validatorOptions.whitelist) + this.whitelist(object, groupedMetadatas, validationErrors); + // General validation + Object.keys(groupedMetadatas).forEach(propertyName => { + const value = object[propertyName]; + const definedMetadatas = groupedMetadatas[propertyName].filter(metadata => metadata.type === ValidationTypes.IS_DEFINED); + const metadatas = groupedMetadatas[propertyName].filter(metadata => metadata.type !== ValidationTypes.IS_DEFINED && metadata.type !== ValidationTypes.WHITELIST); + if (value instanceof Promise && metadatas.find(metadata => metadata.type === ValidationTypes.PROMISE_VALIDATION)) { + this.awaitingPromises.push(value.then((resolvedValue) => { + this.performValidations(object, resolvedValue, propertyName, definedMetadatas, metadatas, validationErrors); + })); + } + else { + this.performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors); + } + }); + } + whitelist(object, groupedMetadatas, validationErrors) { + let notAllowedProperties = []; + Object.keys(object).forEach(propertyName => { + // does this property have no metadata? + if (!groupedMetadatas[propertyName] || groupedMetadatas[propertyName].length === 0) + notAllowedProperties.push(propertyName); + }); + if (notAllowedProperties.length > 0) { + if (this.validatorOptions && this.validatorOptions.forbidNonWhitelisted) { + // throw errors + notAllowedProperties.forEach(property => { + const validationError = this.generateValidationError(object, object[property], property); + validationError.constraints = { [ValidationTypes.WHITELIST]: `property ${property} should not exist` }; + validationError.children = undefined; + validationErrors.push(validationError); + }); + } + else { + // strip non allowed properties + notAllowedProperties.forEach(property => delete object[property]); + } + } + } + stripEmptyErrors(errors) { + return errors.filter(error => { + if (error.children) { + error.children = this.stripEmptyErrors(error.children); + } + if (Object.keys(error.constraints).length === 0) { + if (error.children.length === 0) { + return false; + } + else { + delete error.constraints; + } + } + return true; + }); + } + // ------------------------------------------------------------------------- + // Private Methods + // ------------------------------------------------------------------------- + performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors) { + const customValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.CUSTOM_VALIDATION); + const nestedValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.NESTED_VALIDATION); + const conditionalValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.CONDITIONAL_VALIDATION); + const validationError = this.generateValidationError(object, value, propertyName); + validationErrors.push(validationError); + const canValidate = this.conditionalValidations(object, value, conditionalValidationMetadatas); + if (!canValidate) { + return; + } + // handle IS_DEFINED validation type the special way - it should work no matter skipUndefinedProperties/skipMissingProperties is set or not + this.customValidations(object, value, definedMetadatas, validationError); + this.mapContexts(object, value, definedMetadatas, validationError); + if (value === undefined && this.validatorOptions && this.validatorOptions.skipUndefinedProperties === true) { + return; + } + if (value === null && this.validatorOptions && this.validatorOptions.skipNullProperties === true) { + return; + } + if ((value === null || value === undefined) && this.validatorOptions && this.validatorOptions.skipMissingProperties === true) { + return; + } + this.customValidations(object, value, customValidationMetadatas, validationError); + this.nestedValidations(value, nestedValidationMetadatas, validationError.children); + this.mapContexts(object, value, metadatas, validationError); + this.mapContexts(object, value, customValidationMetadatas, validationError); + } + generateValidationError(object, value, propertyName) { + const validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.value === undefined || + this.validatorOptions.validationError.value === true) + validationError.value = value; + validationError.property = propertyName; + validationError.children = []; + validationError.constraints = {}; + return validationError; + } + conditionalValidations(object, value, metadatas) { + return metadatas + .map(metadata => metadata.constraints[0](object, value)) + .reduce((resultA, resultB) => resultA && resultB, true); + } + customValidations(object, value, metadatas, error) { + metadatas.forEach(metadata => { + this.metadataStorage + .getTargetValidatorConstraints(metadata.constraintCls) + .forEach(customConstraintMetadata => { + if (customConstraintMetadata.async && this.ignoreAsyncValidations) + return; + const validationArguments = { + targetName: object.constructor ? object.constructor.name : undefined, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + if (!metadata.each || !(value instanceof Array || value instanceof Set || value instanceof Map)) { + const validatedValue = customConstraintMetadata.instance.validate(value, validationArguments); + if (isPromise(validatedValue)) { + const promise = validatedValue.then(isValid => { + if (!isValid) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + this.awaitingPromises.push(promise); + } + else { + if (!validatedValue) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + } + } + return; + } + // convert set and map into array + const arrayValue = convertToArray(value); + // Validation needs to be applied to each array item + const validatedSubValues = arrayValue.map((subValue) => customConstraintMetadata.instance.validate(subValue, validationArguments)); + const validationIsAsync = validatedSubValues + .some((validatedSubValue) => isPromise(validatedSubValue)); + if (validationIsAsync) { + // Wrap plain values (if any) in promises, so that all are async + const asyncValidatedSubValues = validatedSubValues + .map((validatedSubValue) => isPromise(validatedSubValue) ? validatedSubValue : Promise.resolve(validatedSubValue)); + const asyncValidationIsFinishedPromise = Promise.all(asyncValidatedSubValues) + .then((flatValidatedValues) => { + const validationResult = flatValidatedValues.every((isValid) => isValid); + if (!validationResult) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + this.awaitingPromises.push(asyncValidationIsFinishedPromise); + return; + } + const validationResult = validatedSubValues.every((isValid) => isValid); + if (!validationResult) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + } + }); + }); + } + nestedValidations(value, metadatas, errors) { + if (value === void 0) { + return; + } + metadatas.forEach(metadata => { + if (metadata.type !== ValidationTypes.NESTED_VALIDATION && + metadata.type !== ValidationTypes.PROMISE_VALIDATION) { + return; + } + if (value instanceof Array || value instanceof Set || value instanceof Map) { + // Treats Set as an array - as index of Set value is value itself and it is common case to have Object as value + const arrayLikeValue = value instanceof Set ? Array.from(value) : value; + arrayLikeValue.forEach((subValue, index) => { + this.performValidations(value, subValue, index.toString(), [], metadatas, errors); + }); + } + else if (value instanceof Object) { + const targetSchema = typeof metadata.target === "string" ? metadata.target : metadata.target.name; + this.execute(value, targetSchema, errors); + } + else { + const error = new ValidationError(); + error.value = value; + error.property = metadata.propertyName; + error.target = metadata.target; + const [type, message] = this.createValidationError(metadata.target, value, metadata); + error.constraints = { + [type]: message + }; + errors.push(error); + } + }); + } + mapContexts(object, value, metadatas, error) { + return metadatas + .forEach(metadata => { + if (metadata.context) { + let customConstraint; + if (metadata.type === ValidationTypes.CUSTOM_VALIDATION) { + const customConstraints = this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls); + customConstraint = customConstraints[0]; + } + const type = this.getConstraintType(metadata, customConstraint); + if (error.constraints[type]) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + } + createValidationError(object, value, metadata, customValidatorMetadata) { + const targetName = object.constructor ? object.constructor.name : undefined; + const type = this.getConstraintType(metadata, customValidatorMetadata); + const validationArguments = { + targetName: targetName, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + let message = metadata.message || ""; + if (!metadata.message && + (!this.validatorOptions || (this.validatorOptions && !this.validatorOptions.dismissDefaultMessages))) { + if (customValidatorMetadata && customValidatorMetadata.instance.defaultMessage instanceof Function) { + message = customValidatorMetadata.instance.defaultMessage(validationArguments); + } + } + const messageString = ValidationUtils.replaceMessageSpecialTokens(message, validationArguments); + return [type, messageString]; + } + getConstraintType(metadata, customValidatorMetadata) { + const type = customValidatorMetadata && customValidatorMetadata.name ? customValidatorMetadata.name : metadata.type; + return type; + } +} + +/** + * Validator performs validation of the given object based on its metadata. + */ +class Validator { + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + /** + * Performs validation of the given object based on decorators or validation schema. + * Common method for `validateOrReject` and `validate` methods. + */ + coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + const options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + const schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + const executor = new ValidationExecutor(this, options); + const validationErrors = []; + executor.execute(object, schema, validationErrors); + return Promise.all(executor.awaitingPromises).then(() => { + return executor.stripEmptyErrors(validationErrors); + }); + } + /** + * Performs validation of the given object based on decorators or validation schema. + */ + validate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + return this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + } + /** + * Performs validation of the given object based on decorators or validation schema and reject on error. + */ + async validateOrReject(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const errors = await this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + if (errors.length) + return Promise.reject(errors); + } + /** + * Performs validation of the given object based on decorators or validation schema. + */ + validateSync(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + const options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + const schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + const executor = new ValidationExecutor(this, options); + executor.ignoreAsyncValidations = true; + const validationErrors = []; + executor.execute(object, schema, validationErrors); + return executor.stripEmptyErrors(validationErrors); + } +} + +/** + * Container to be used by this library for inversion control. If container was not implicitly set then by default + * container simply creates a new instance of the given class. + */ +const defaultContainer = new (class { + constructor() { + this.instances = []; + } + get(someClass) { + let instance = this.instances.find(instance => instance.type === someClass); + if (!instance) { + instance = { type: someClass, object: new someClass() }; + this.instances.push(instance); + } + return instance.object; + } +})(); +let userContainer; +let userContainerOptions; +/** + * Sets container to be used by this library. + */ +function useContainer(iocContainer, options) { + userContainer = iocContainer; + userContainerOptions = options; +} +/** + * Gets the IOC container used by this library. + */ +function getFromContainer(someClass) { + if (userContainer) { + try { + const instance = userContainer.get(someClass); + if (instance) + return instance; + if (!userContainerOptions || !userContainerOptions.fallback) + return instance; + } + catch (error) { + if (!userContainerOptions || !userContainerOptions.fallbackOnErrors) + throw error; + } + } + return defaultContainer.get(someClass); +} + +/** + * If object has both allowed and not allowed properties a validation error will be thrown. + */ +function Allow(validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.WHITELIST, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +/** + * This metadata interface contains information for custom validators. + */ +class ConstraintMetadata { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(target, name, async = false) { + this.target = target; + this.name = name; + this.async = async; + } + // ------------------------------------------------------------------------- + // Accessors + // ------------------------------------------------------------------------- + /** + * Instance of the target custom validation class which performs validation. + */ + get instance() { + return getFromContainer(this.target); + } +} + +/** + * Registers a custom validation decorator. + */ +function registerDecorator(options) { + let constraintCls; + if (options.validator instanceof Function) { + constraintCls = options.validator; + const constraintClasses = getFromContainer(MetadataStorage).getTargetValidatorConstraints(options.validator); + if (constraintClasses.length > 1) { + throw `More than one implementation of ValidatorConstraintInterface found for validator on: ${options.target}:${options.propertyName}`; + } + } + else { + const validator = options.validator; + constraintCls = class CustomConstraint { + validate(value, validationArguments) { + return validator.validate(value, validationArguments); + } + defaultMessage(validationArguments) { + if (validator.defaultMessage) { + return validator.defaultMessage(validationArguments); + } + return ""; + } + }; + getMetadataStorage().addConstraintMetadata(new ConstraintMetadata(constraintCls, options.name, options.async)); + } + const validationMetadataArgs = { + type: options.name && ValidationTypes.isValid(options.name) ? options.name : ValidationTypes.CUSTOM_VALIDATION, + target: options.target, + propertyName: options.propertyName, + validationOptions: options.options, + constraintCls: constraintCls, + constraints: options.constraints + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(validationMetadataArgs)); +} + +function buildMessage(impl, validationOptions) { + return (validationArguments) => { + const eachPrefix = validationOptions && validationOptions.each + ? "each value in " + : ""; + return impl(eachPrefix, validationArguments); + }; +} +function ValidateBy(options, validationOptions) { + return function (object, propertyName) { + registerDecorator({ + name: options.name, + target: object.constructor, + propertyName: propertyName, + options: validationOptions, + constraints: options.constraints, + validator: options.validator + }); + }; +} + +// isDefined is (yet) a special case +const IS_DEFINED = ValidationTypes.IS_DEFINED; +/** + * Checks if value is defined (!== undefined, !== null). + */ +function isDefined(value) { + return value !== undefined && value !== null; +} +/** + * Checks if value is defined (!== undefined, !== null). + */ +function IsDefined(validationOptions) { + return ValidateBy({ + name: IS_DEFINED, + validator: { + validate: (value) => isDefined(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be null or undefined", validationOptions) + } + }, validationOptions); +} + +/** + * Checks if value is missing and if so, ignores all validators. + */ +function IsOptional(validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [(object, value) => { + return object[propertyName] !== null && object[propertyName] !== undefined; + }], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +/** + * Registers custom validator class. + */ +function ValidatorConstraint(options) { + return function (target) { + const isAsync = options && options.async ? true : false; + let name = options && options.name ? options.name : ""; + if (!name) { + name = target.name; + if (!name) // generate name if it was not given + name = name.replace(/\.?([A-Z]+)/g, (x, y) => "_" + y.toLowerCase()).replace(/^_/, ""); + } + const metadata = new ConstraintMetadata(target, name, isAsync); + getMetadataStorage().addConstraintMetadata(metadata); + }; +} +function Validate(constraintClass, constraintsOrValidationOptions, maybeValidationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.CUSTOM_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraintCls: constraintClass, + constraints: constraintsOrValidationOptions instanceof Array ? constraintsOrValidationOptions : undefined, + validationOptions: !(constraintsOrValidationOptions instanceof Array) ? constraintsOrValidationOptions : maybeValidationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +function ValidateIf(condition, validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [condition], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +function ValidateNested(validationOptions) { + const opts = { ...validationOptions }; + const eachPrefix = opts.each ? "each value in " : ""; + opts.message = opts.message || eachPrefix + "nested property $property must be either object or array"; + return function (object, propertyName) { + const args = { + type: ValidationTypes.NESTED_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: opts, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +/** + * Resolve promise before validation + */ +function ValidatePromise(validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.PROMISE_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +const IS_LATLONG = "isLatLong"; +/** + * Checks if a value is string in format a "latitude,longitude". + */ +function isLatLong(value) { + return typeof value === "string" && validator.isLatLong(value); +} +/** + * Checks if a value is string in format a "latitude,longitude". + */ +function IsLatLong(validationOptions) { + return ValidateBy({ + name: IS_LATLONG, + validator: { + validate: (value, args) => isLatLong(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a latitude,longitude string", validationOptions) + } + }, validationOptions); +} + +const IS_LATITUDE = "isLatitude"; +/** + * Checks if a given value is a latitude. + */ +function isLatitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong(`${value},0`); +} +/** + * Checks if a given value is a latitude. + */ +function IsLatitude(validationOptions) { + return ValidateBy({ + name: IS_LATITUDE, + validator: { + validate: (value, args) => isLatitude(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a latitude string or number", validationOptions) + } + }, validationOptions); +} + +const IS_LONGITUDE = "isLongitude"; +/** + * Checks if a given value is a longitude. + */ +function isLongitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong(`0,${value}`); +} +/** + * Checks if a given value is a longitude. + */ +function IsLongitude(validationOptions) { + return ValidateBy({ + name: IS_LONGITUDE, + validator: { + validate: (value, args) => isLongitude(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a longitude string or number", validationOptions) + } + }, validationOptions); +} + +const EQUALS = "equals"; +/** + * Checks if value matches ("===") the comparison. + */ +function equals(value, comparison) { + return value === comparison; +} +/** + * Checks if value matches ("===") the comparison. + */ +function Equals(comparison, validationOptions) { + return ValidateBy({ + name: EQUALS, + constraints: [comparison], + validator: { + validate: (value, args) => equals(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be equal to $constraint1", validationOptions) + } + }, validationOptions); +} + +const NOT_EQUALS = "notEquals"; +/** + * Checks if value does not match ("!==") the comparison. + */ +function notEquals(value, comparison) { + return value !== comparison; +} +/** + * Checks if value does not match ("!==") the comparison. + */ +function NotEquals(comparison, validationOptions) { + return ValidateBy({ + name: NOT_EQUALS, + constraints: [comparison], + validator: { + validate: (value, args) => notEquals(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be equal to $constraint1", validationOptions) + } + }, validationOptions); +} + +const IS_EMPTY = "isEmpty"; +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +function isEmpty(value) { + return value === "" || value === null || value === undefined; +} +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +function IsEmpty(validationOptions) { + return ValidateBy({ + name: IS_EMPTY, + validator: { + validate: (value, args) => isEmpty(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be empty", validationOptions) + } + }, validationOptions); +} + +const IS_NOT_EMPTY = "isNotEmpty"; +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +function isNotEmpty(value) { + return value !== "" && value !== null && value !== undefined; +} +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +function IsNotEmpty(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY, + validator: { + validate: (value, args) => isNotEmpty(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be empty", validationOptions) + } + }, validationOptions); +} + +const IS_IN = "isIn"; +/** + * Checks if given value is in a array of allowed values. + */ +function isIn(value, possibleValues) { + return !(possibleValues instanceof Array) || possibleValues.some(possibleValue => possibleValue === value); +} +/** + * Checks if given value is in a array of allowed values. + */ +function IsIn(values, validationOptions) { + return ValidateBy({ + name: IS_IN, + constraints: [values], + validator: { + validate: (value, args) => isIn(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be one of the following values: $constraint1", validationOptions) + } + }, validationOptions); +} + +const IS_NOT_IN = "isNotIn"; +/** + * Checks if given value not in a array of allowed values. + */ +function isNotIn(value, possibleValues) { + return !(possibleValues instanceof Array) || !possibleValues.some(possibleValue => possibleValue === value); +} +/** + * Checks if given value not in a array of allowed values. + */ +function IsNotIn(values, validationOptions) { + return ValidateBy({ + name: IS_NOT_IN, + constraints: [values], + validator: { + validate: (value, args) => isNotIn(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be one of the following values: $constraint1", validationOptions) + } + }, validationOptions); +} + +const IS_DIVISIBLE_BY = "isDivisibleBy"; +/** + * Checks if value is a number that's divisible by another. + */ +function isDivisibleBy(value, num) { + return typeof value === "number" && + typeof num === "number" && + validator.isDivisibleBy(String(value), num); +} +/** + * Checks if value is a number that's divisible by another. + */ +function IsDivisibleBy(num, validationOptions) { + return ValidateBy({ + name: IS_DIVISIBLE_BY, + constraints: [num], + validator: { + validate: (value, args) => isDivisibleBy(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be divisible by $constraint1", validationOptions) + } + }, validationOptions); +} + +const IS_POSITIVE = "isPositive"; +/** + * Checks if the value is a positive number greater than zero. + */ +function isPositive(value) { + return typeof value === "number" && value > 0; +} +/** + * Checks if the value is a positive number greater than zero. + */ +function IsPositive(validationOptions) { + return ValidateBy({ + name: IS_POSITIVE, + validator: { + validate: (value, args) => isPositive(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a positive number", validationOptions) + } + }, validationOptions); +} + +const IS_NEGATIVE = "isNegative"; +/** + * Checks if the value is a negative number smaller than zero. + */ +function isNegative(value) { + return typeof value === "number" && value < 0; +} +/** + * Checks if the value is a negative number smaller than zero. + */ +function IsNegative(validationOptions) { + return ValidateBy({ + name: IS_NEGATIVE, + validator: { + validate: (value, args) => isNegative(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a negative number", validationOptions) + } + }, validationOptions); +} + +const MAX = "max"; +/** + * Checks if the first number is less than or equal to the second. + */ +function max(num, max) { + return typeof num === "number" && typeof max === "number" && num <= max; +} +/** + * Checks if the first number is less than or equal to the second. + */ +function Max(maxValue, validationOptions) { + return ValidateBy({ + name: MAX, + constraints: [maxValue], + validator: { + validate: (value, args) => max(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must not be greater than $constraint1", validationOptions) + } + }, validationOptions); +} + +const MIN = "min"; +/** + * Checks if the first number is greater than or equal to the second. + */ +function min(num, min) { + return typeof num === "number" && typeof min === "number" && num >= min; +} +/** + * Checks if the first number is greater than or equal to the second. + */ +function Min(minValue, validationOptions) { + return ValidateBy({ + name: MIN, + constraints: [minValue], + validator: { + validate: (value, args) => min(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must not be less than $constraint1", validationOptions) + } + }, validationOptions); +} + +const MIN_DATE = "minDate"; +/** + * Checks if the value is a date that's after the specified date. + */ +function minDate(date, minDate) { + return date instanceof Date && date.getTime() >= minDate.getTime(); +} +/** + * Checks if the value is a date that's after the specified date. + */ +function MinDate(date, validationOptions) { + return ValidateBy({ + name: MIN_DATE, + constraints: [date], + validator: { + validate: (value, args) => minDate(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => "minimal allowed date for " + eachPrefix + "$property is $constraint1", validationOptions) + } + }, validationOptions); +} + +const MAX_DATE = "maxDate"; +/** +* Checks if the value is a date that's before the specified date. +*/ +function maxDate(date, maxDate) { + return date instanceof Date && date.getTime() <= maxDate.getTime(); +} +/** + * Checks if the value is a date that's after the specified date. + */ +function MaxDate(date, validationOptions) { + return ValidateBy({ + name: MAX_DATE, + constraints: [date], + validator: { + validate: (value, args) => maxDate(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => "maximal allowed date for " + eachPrefix + "$property is $constraint1", validationOptions) + } + }, validationOptions); +} + +const CONTAINS = "contains"; +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +function contains(value, seed) { + return typeof value === "string" && validator.contains(value, seed); +} +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +function Contains(seed, validationOptions) { + return ValidateBy({ + name: CONTAINS, + constraints: [seed], + validator: { + validate: (value, args) => contains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a $constraint1 string", validationOptions) + } + }, validationOptions); +} + +const NOT_CONTAINS = "notContains"; +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +function notContains(value, seed) { + return typeof value === "string" && !validator.contains(value, seed); +} +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +function NotContains(seed, validationOptions) { + return ValidateBy({ + name: NOT_CONTAINS, + constraints: [seed], + validator: { + validate: (value, args) => notContains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not contain a $constraint1 string", validationOptions) + } + }, validationOptions); +} + +const IS_ALPHA = "isAlpha"; +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +function isAlpha(value, locale) { + return typeof value === "string" && validator.isAlpha(value, locale); +} +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +function IsAlpha(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHA, + constraints: [locale], + validator: { + validate: (value, args) => isAlpha(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain only letters (a-zA-Z)", validationOptions) + } + }, validationOptions); +} + +const IS_ALPHANUMERIC = "isAlphanumeric"; +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +function isAlphanumeric(value, locale) { + return typeof value === "string" && validator.isAlphanumeric(value, locale); +} +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +function IsAlphanumeric(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHANUMERIC, + constraints: [locale], + validator: { + validate: (value, args) => isAlphanumeric(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain only letters and numbers", validationOptions) + } + }, validationOptions); +} + +const IS_DECIMAL = "isDecimal"; +/** + * Checks if the string is a valid decimal. + * If given value is not a string, then it returns false. + */ +function isDecimal(value, options) { + return typeof value === "string" && validator.isDecimal(value, options); +} +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +function IsDecimal(options, validationOptions) { + return ValidateBy({ + name: IS_DECIMAL, + constraints: [options], + validator: { + validate: (value, args) => isDecimal(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property is not a valid decimal number.", validationOptions) + } + }, validationOptions); +} + +const IS_ASCII = "isAscii"; +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +function isAscii(value) { + return typeof value === "string" && validator.isAscii(value); +} +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +function IsAscii(validationOptions) { + return ValidateBy({ + name: IS_ASCII, + validator: { + validate: (value, args) => isAscii(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain only ASCII characters", validationOptions) + } + }, validationOptions); +} + +const IS_BASE64 = "isBase64"; +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +function isBase64(value) { + return typeof value === "string" && validator.isBase64(value); +} +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +function IsBase64(validationOptions) { + return ValidateBy({ + name: IS_BASE64, + validator: { + validate: (value, args) => isBase64(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be base64 encoded", validationOptions) + } + }, validationOptions); +} + +const IS_BYTE_LENGTH = "isByteLength"; +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +function isByteLength(value, min, max) { + return typeof value === "string" && validator.isByteLength(value, { min, max }); +} +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +function IsByteLength(min, max, validationOptions) { + return ValidateBy({ + name: IS_BYTE_LENGTH, + constraints: [min, max], + validator: { + validate: (value, args) => isByteLength(value, args.constraints[0], args.constraints[1]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property's byte length must fall into ($constraint1, $constraint2) range", validationOptions) + } + }, validationOptions); +} + +const IS_CREDIT_CARD = "isCreditCard"; +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +function isCreditCard(value) { + return typeof value === "string" && validator.isCreditCard(value); +} +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +function IsCreditCard(validationOptions) { + return ValidateBy({ + name: IS_CREDIT_CARD, + validator: { + validate: (value, args) => isCreditCard(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a credit card", validationOptions) + } + }, validationOptions); +} + +const IS_CURRENCY = "isCurrency"; +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +function isCurrency(value, options) { + return typeof value === "string" && validator.isCurrency(value, options); +} +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +function IsCurrency(options, validationOptions) { + return ValidateBy({ + name: IS_CURRENCY, + constraints: [options], + validator: { + validate: (value, args) => isCurrency(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a currency", validationOptions) + } + }, validationOptions); +} + +const IS_EMAIL = "isEmail"; +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +function isEmail(value, options) { + return typeof value === "string" && validator.isEmail(value, options); +} +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +function IsEmail(options, validationOptions) { + return ValidateBy({ + name: IS_EMAIL, + constraints: [options], + validator: { + validate: (value, args) => isEmail(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an email", validationOptions) + } + }, validationOptions); +} + +const IS_FQDN = "isFqdn"; +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +function isFQDN(value, options) { + return typeof value === "string" && validator.isFQDN(value, options); +} +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +function IsFQDN(options, validationOptions) { + return ValidateBy({ + name: IS_FQDN, + constraints: [options], + validator: { + validate: (value, args) => isFQDN(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid domain name", validationOptions) + } + }, validationOptions); +} + +const IS_FULL_WIDTH = "isFullWidth"; +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +function isFullWidth(value) { + return typeof value === "string" && validator.isFullWidth(value); +} +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +function IsFullWidth(validationOptions) { + return ValidateBy({ + name: IS_FULL_WIDTH, + validator: { + validate: (value, args) => isFullWidth(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a full-width characters", validationOptions) + } + }, validationOptions); +} + +const IS_HALF_WIDTH = "isHalfWidth"; +/** + * Checks if the string contains any half-width chars. + * If given value is not a string, then it returns false. + */ +function isHalfWidth(value) { + return typeof value === "string" && validator.isHalfWidth(value); +} +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +function IsHalfWidth(validationOptions) { + return ValidateBy({ + name: IS_HALF_WIDTH, + validator: { + validate: (value, args) => isHalfWidth(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a half-width characters", validationOptions) + } + }, validationOptions); +} + +const IS_VARIABLE_WIDTH = "isVariableWidth"; +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +function isVariableWidth(value) { + return typeof value === "string" && validator.isVariableWidth(value); +} +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +function IsVariableWidth(validationOptions) { + return ValidateBy({ + name: IS_VARIABLE_WIDTH, + validator: { + validate: (value, args) => isVariableWidth(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a full-width and half-width characters", validationOptions) + } + }, validationOptions); +} + +const IS_HEX_COLOR = "isHexColor"; +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +function isHexColor(value) { + return typeof value === "string" && validator.isHexColor(value); +} +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +function IsHexColor(validationOptions) { + return ValidateBy({ + name: IS_HEX_COLOR, + validator: { + validate: (value, args) => isHexColor(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a hexadecimal color", validationOptions) + } + }, validationOptions); +} + +const IS_HEXADECIMAL = "isHexadecimal"; +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +function isHexadecimal(value) { + return typeof value === "string" && validator.isHexadecimal(value); +} +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +function IsHexadecimal(validationOptions) { + return ValidateBy({ + name: IS_HEXADECIMAL, + validator: { + validate: (value, args) => isHexadecimal(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a hexadecimal number", validationOptions) + } + }, validationOptions); +} + +function isValidationOptions(val) { + if (!val) { + return false; + } + return "each" in val + || "message" in val + || "groups" in val + || "always" in val + || "context" in val; +} + +const IS_MAC_ADDRESS = "isMacAddress"; +/** + * Check if the string is a MAC address. + * If given value is not a string, then it returns false. + */ +function isMACAddress(value, options) { + return typeof value === "string" && validator.isMACAddress(value, options); +} +function IsMACAddress(optionsOrValidationOptionsArg, validationOptionsArg) { + const options = !isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : undefined; + const validationOptions = isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : validationOptionsArg; + return ValidateBy({ + name: IS_MAC_ADDRESS, + constraints: [options], + validator: { + validate: (value, args) => isMACAddress(value, options), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a MAC Address", validationOptions) + } + }, validationOptions); +} + +const IS_IP = "isIp"; +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +function isIP(value, version) { + const versionStr = version ? `${version}` : undefined; + return typeof value === "string" && validator.isIP(value, versionStr); +} +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +function IsIP(version, validationOptions) { + return ValidateBy({ + name: IS_IP, + constraints: [version], + validator: { + validate: (value, args) => isIP(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ip address", validationOptions) + } + }, validationOptions); +} + +const IS_PORT = "isPort"; +/** + * Check if the string is a valid port number. + */ +function isPort(value) { + return typeof value === "string" && validator.isPort(value); +} +/** + * Check if the string is a valid port number. + */ +function IsPort(validationOptions) { + return ValidateBy({ + name: IS_PORT, + validator: { + validate: (value, args) => isPort(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a port", validationOptions) + } + }, validationOptions); +} + +const IS_ISBN = "isIsbn"; +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +function isISBN(value, version) { + const versionStr = version ? `${version}` : undefined; + return typeof value === "string" && validator.isISBN(value, versionStr); +} +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +function IsISBN(version, validationOptions) { + return ValidateBy({ + name: IS_ISBN, + constraints: [version], + validator: { + validate: (value, args) => isISBN(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ISBN", validationOptions) + } + }, validationOptions); +} + +const IS_ISIN = "isIsin"; +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +function isISIN(value) { + return typeof value === "string" && validator.isISIN(value); +} +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +function IsISIN(validationOptions) { + return ValidateBy({ + name: IS_ISIN, + validator: { + validate: (value, args) => isISIN(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ISIN (stock/security identifier)", validationOptions) + } + }, validationOptions); +} + +const IS_ISO8601 = "isIso8601"; +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +function isISO8601(value, options) { + return typeof value === "string" && validator.isISO8601(value, options); +} +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +function IsISO8601(options, validationOptions) { + return ValidateBy({ + name: IS_ISO8601, + constraints: [options], + validator: { + validate: (value, args) => isISO8601(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid ISO 8601 date string", validationOptions) + } + }, validationOptions); +} + +const IS_JSON = "isJson"; +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +function isJSON(value) { + return typeof value === "string" && validator.isJSON(value); +} +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +function IsJSON(validationOptions) { + return ValidateBy({ + name: IS_JSON, + validator: { + validate: (value, args) => isJSON(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a json string", validationOptions) + } + }, validationOptions); +} + +const IS_JWT = "isJwt"; +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +function isJWT(value) { + return typeof value === "string" && validator.isJWT(value); +} +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +function IsJWT(validationOptions) { + return ValidateBy({ + name: IS_JWT, + validator: { + validate: (value, args) => isJWT(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a jwt string", validationOptions) + } + }, validationOptions); +} + +const IS_LOWERCASE = "isLowercase"; +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +function isLowercase(value) { + return typeof value === "string" && validator.isLowercase(value); +} +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +function IsLowercase(validationOptions) { + return ValidateBy({ + name: IS_LOWERCASE, + validator: { + validate: (value, args) => isLowercase(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a lowercase string", validationOptions) + } + }, validationOptions); +} + +const IS_MOBILE_PHONE = "isMobilePhone"; +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +function isMobilePhone(value, locale, options) { + return typeof value === "string" && validator.isMobilePhone(value, locale, options); +} +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +function IsMobilePhone(locale, options, validationOptions) { + return ValidateBy({ + name: IS_MOBILE_PHONE, + constraints: [locale, options], + validator: { + validate: (value, args) => isMobilePhone(value, args.constraints[0], args.constraints[1]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a phone number", validationOptions) + } + }, validationOptions); +} + +const IS_ISO31661_ALPHA_2 = "isISO31661Alpha2"; +/** + * 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. + */ +function isISO31661Alpha2(value) { + return typeof value === "string" && validator.isISO31661Alpha2(value); +} +/** + * 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. + */ +function IsISO31661Alpha2(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_2, + validator: { + validate: (value, args) => isISO31661Alpha2(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid ISO31661 Alpha2 code", validationOptions) + } + }, validationOptions); +} + +const IS_ISO31661_ALPHA_3 = "isISO31661Alpha3"; +/** + * 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. + */ +function isISO31661Alpha3(value) { + return typeof value === "string" && validator.isISO31661Alpha3(value); +} +/** + * 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. + */ +function IsISO31661Alpha3(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_3, + validator: { + validate: (value, args) => isISO31661Alpha3(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid ISO31661 Alpha3 code", validationOptions) + } + }, validationOptions); +} + +const IS_MONGO_ID = "isMongoId"; +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +function isMongoId(value) { + return typeof value === "string" && validator.isMongoId(value); +} +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +function IsMongoId(validationOptions) { + return ValidateBy({ + name: IS_MONGO_ID, + validator: { + validate: (value, args) => isMongoId(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a mongodb id", validationOptions) + } + }, validationOptions); +} + +const IS_MULTIBYTE = "isMultibyte"; +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +function isMultibyte(value) { + return typeof value === "string" && validator.isMultibyte(value); +} +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +function IsMultibyte(validationOptions) { + return ValidateBy({ + name: IS_MULTIBYTE, + validator: { + validate: (value, args) => isMultibyte(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain one or more multibyte chars", validationOptions) + } + }, validationOptions); +} + +const IS_SURROGATE_PAIR = "isSurrogatePair"; +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +function isSurrogatePair(value) { + return typeof value === "string" && validator.isSurrogatePair(value); +} +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +function IsSurrogatePair(validationOptions) { + return ValidateBy({ + name: IS_SURROGATE_PAIR, + validator: { + validate: (value, args) => isSurrogatePair(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain any surrogate pairs chars", validationOptions) + } + }, validationOptions); +} + +const IS_URL = "isUrl"; +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +function isURL(value, options) { + return typeof value === "string" && validator.isURL(value, options); +} +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +function IsUrl(options, validationOptions) { + return ValidateBy({ + name: IS_URL, + constraints: [options], + validator: { + validate: (value, args) => isURL(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an URL address", validationOptions) + } + }, validationOptions); +} + +const IS_UUID = "isUuid"; +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +function isUUID(value, version) { + return typeof value === "string" && validator.isUUID(value, version); +} +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +function IsUUID(version, validationOptions) { + return ValidateBy({ + name: IS_UUID, + constraints: [version], + validator: { + validate: (value, args) => isUUID(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an UUID", validationOptions) + } + }, validationOptions); +} + +const IS_FIREBASE_PUSH_ID = "IsFirebasePushId"; +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +function isFirebasePushId(value) { + const webSafeRegex = /^[a-zA-Z0-9_-]*$/; + return typeof value === "string" && value.length === 20 && webSafeRegex.test(value); +} +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +function IsFirebasePushId(validationOptions) { + return ValidateBy({ + name: IS_FIREBASE_PUSH_ID, + validator: { + validate: (value, args) => isFirebasePushId(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a Firebase Push Id", validationOptions) + } + }, validationOptions); +} + +const IS_UPPERCASE = "isUppercase"; +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +function isUppercase(value) { + return typeof value === "string" && validator.isUppercase(value); +} +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +function IsUppercase(validationOptions) { + return ValidateBy({ + name: IS_UPPERCASE, + validator: { + validate: (value, args) => isUppercase(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be uppercase", validationOptions) + } + }, validationOptions); +} + +const LENGTH = "length"; +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +function length(value, min, max) { + return typeof value === "string" && validator.isLength(value, { min, max }); +} +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +function Length(min, max, validationOptions) { + return ValidateBy({ + name: LENGTH, + constraints: [min, max], + validator: { + validate: (value, args) => length(value, args.constraints[0], args.constraints[1]), + defaultMessage: buildMessage((eachPrefix, args) => { + const isMinLength = args.constraints[0] !== null && args.constraints[0] !== undefined; + const isMaxLength = args.constraints[1] !== null && args.constraints[1] !== undefined; + if (isMinLength && (!args.value || args.value.length < args.constraints[0])) { + return eachPrefix + "$property must be longer than or equal to $constraint1 characters"; + } + else if (isMaxLength && (args.value.length > args.constraints[1])) { + return eachPrefix + "$property must be shorter than or equal to $constraint2 characters"; + } + return eachPrefix + "$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"; + }, validationOptions) + } + }, validationOptions); +} + +const MAX_LENGTH = "maxLength"; +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +function maxLength(value, max) { + return typeof value === "string" && validator.isLength(value, { min: 0, max }); +} +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +function MaxLength(max, validationOptions) { + return ValidateBy({ + name: MAX_LENGTH, + constraints: [max], + validator: { + validate: (value, args) => maxLength(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be shorter than or equal to $constraint1 characters", validationOptions) + } + }, validationOptions); +} + +const MIN_LENGTH = "minLength"; +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +function minLength(value, min) { + return typeof value === "string" && validator.isLength(value, { min }); +} +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +function MinLength(min, validationOptions) { + return ValidateBy({ + name: MIN_LENGTH, + constraints: [min], + validator: { + validate: (value, args) => minLength(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be longer than or equal to $constraint1 characters", validationOptions) + } + }, validationOptions); +} + +const MATCHES = "matches"; +function matches(value, pattern, modifiers) { + return typeof value === "string" && validator.matches(value, pattern, modifiers); +} +function Matches(pattern, modifiersOrAnnotationOptions, validationOptions) { + let modifiers; + if (modifiersOrAnnotationOptions && modifiersOrAnnotationOptions instanceof Object && !validationOptions) { + validationOptions = modifiersOrAnnotationOptions; + } + else { + modifiers = modifiersOrAnnotationOptions; + } + return ValidateBy({ + name: MATCHES, + constraints: [pattern, modifiers], + validator: { + validate: (value, args) => matches(value, args.constraints[0], args.constraints[0]), + defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + "$property must match $constraint1 regular expression", validationOptions) + } + }, validationOptions); +} + +const IS_PHONE_NUMBER = "isPhoneNumber"; +/** + * Checks if the string is a valid phone number. + * @param value the potential phone number string to test + * @param {string} region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +function isPhoneNumber(value, region) { + const phoneUtil = PhoneNumberUtil.getInstance(); + try { + const phoneNum = phoneUtil.parseAndKeepRawInput(value, region); + const result = phoneUtil.isValidNumber(phoneNum); + return result; + } + catch (error) { + // logging? + return false; + } +} +/** + * Checks if the string is a valid phone number. + * @param region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +function IsPhoneNumber(region, validationOptions) { + return ValidateBy({ + name: IS_PHONE_NUMBER, + constraints: [region], + validator: { + validate: (value, args) => isPhoneNumber(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid phone number", validationOptions), + } + }, validationOptions); +} + +const IS_MILITARY_TIME = "isMilitaryTime"; +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +function isMilitaryTime(value) { + const militaryTimeRegex = /^([01]\d|2[0-3]):?([0-5]\d)$/; + return typeof value === "string" && validator.matches(value, militaryTimeRegex); +} +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +function IsMilitaryTime(validationOptions) { + return ValidateBy({ + name: IS_MILITARY_TIME, + validator: { + validate: (value, args) => isMilitaryTime(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid representation of military time in the format HH:MM", validationOptions) + } + }, validationOptions); +} + +const IS_HASH = "isHash"; +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +function isHash(value, algorithm) { + return typeof value === "string" && validator.isHash(value, algorithm); +} +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +function IsHash(algorithm, validationOptions) { + return ValidateBy({ + name: IS_HASH, + constraints: [algorithm], + validator: { + validate: (value, args) => isHash(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a hash of type $constraint1", validationOptions) + } + }, validationOptions); +} + +const IS_ISSN = "isISSN"; +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +function isISSN(value, options) { + return typeof value === "string" && validator.isISSN(value, options); +} +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +function IsISSN(options, validationOptions) { + return ValidateBy({ + name: IS_ISSN, + constraints: [options], + validator: { + validate: (value, args) => isISSN(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a ISSN", validationOptions) + } + }, validationOptions); +} + +const IS_DATE_STRING = "isDateString"; +/** + * Checks if a given value is a ISOString date. + */ +function isDateString(value) { + 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; + return typeof value === "string" && regex.test(value); +} +/** + * Checks if a given value is a ISOString date. + */ +function IsDateString(validationOptions) { + return ValidateBy({ + name: IS_DATE_STRING, + validator: { + validate: (value, args) => isDateString(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a ISOString", validationOptions) + } + }, validationOptions); +} + +const IS_BOOLEAN_STRING = "isBooleanString"; +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +function isBooleanString(value) { + return typeof value === "string" && validator.isBoolean(value); +} +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +function IsBooleanString(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN_STRING, + validator: { + validate: (value, args) => isBooleanString(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a boolean string", validationOptions) + } + }, validationOptions); +} + +const IS_NUMBER_STRING = "isNumberString"; +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +function isNumberString(value, options) { + return typeof value === "string" && validator.isNumeric(value, options); +} +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +function IsNumberString(options, validationOptions) { + return ValidateBy({ + name: IS_NUMBER_STRING, + constraints: [options], + validator: { + validate: (value, args) => isNumberString(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a number string", validationOptions) + } + }, validationOptions); +} + +const IS_BASE32 = "isBase32"; +/** + * Checks if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +function isBase32(value) { + return typeof value === "string" && validator.isBase32(value); +} +/** + * Check if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +function IsBase32(validationOptions) { + return ValidateBy({ + name: IS_BASE32, + validator: { + validate: (value, args) => isBase32(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be base32 encoded", validationOptions) + } + }, validationOptions); +} + +const IS_BIC = "isBIC"; +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +function isBIC(value) { + return typeof value === "string" && validator.isBIC(value); +} +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +function IsBIC(validationOptions) { + return ValidateBy({ + name: IS_BIC, + validator: { + validate: (value, args) => isBIC(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a BIC or SWIFT code", validationOptions) + } + }, validationOptions); +} + +const IS_BTC_ADDRESS = "isBtcAddress"; +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +function isBtcAddress(value) { + return typeof value === "string" && validator.isBtcAddress(value); +} +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +function IsBtcAddress(validationOptions) { + return ValidateBy({ + name: IS_BTC_ADDRESS, + validator: { + validate: (value, args) => isBtcAddress(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a BTC address", validationOptions) + } + }, validationOptions); +} + +const IS_DATA_URI = "isDataURI"; +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +function isDataURI(value) { + return typeof value === "string" && validator.isDataURI(value); +} +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +function IsDataURI(validationOptions) { + return ValidateBy({ + name: IS_DATA_URI, + validator: { + validate: (value, args) => isDataURI(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a data uri format", validationOptions) + } + }, validationOptions); +} + +const IS_EAN = "isEAN"; +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +function isEAN(value) { + return typeof value === "string" && validator.isEAN(value); +} +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +function IsEAN(validationOptions) { + return ValidateBy({ + name: IS_EAN, + validator: { + validate: (value, args) => isEAN(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an EAN (European Article Number)", validationOptions) + } + }, validationOptions); +} + +const IS_ETHEREUM_ADDRESS = "isEthereumAddress"; +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +function isEthereumAddress(value) { + return typeof value === "string" && validator.isEthereumAddress(value); +} +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +function IsEthereumAddress(validationOptions) { + return ValidateBy({ + name: IS_ETHEREUM_ADDRESS, + validator: { + validate: (value, args) => isEthereumAddress(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an Ethereum address", validationOptions) + } + }, validationOptions); +} + +const IS_HSL = "isHSL"; +/** +* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +function isHSL(value) { + return typeof value === "string" && validator.isHSL(value); +} +/** + * Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +function IsHSL(validationOptions) { + return ValidateBy({ + name: IS_HSL, + validator: { + validate: (value, args) => isHSL(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a HSL color", validationOptions) + } + }, validationOptions); +} + +const IS_IBAN = "isIBAN"; +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +function isIBAN(value) { + return typeof value === "string" && validator.isIBAN(value); +} +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +function IsIBAN(validationOptions) { + return ValidateBy({ + name: IS_IBAN, + validator: { + validate: (value, args) => isIBAN(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an IBAN", validationOptions) + } + }, validationOptions); +} + +const IS_IDENTITY_CARD = "isIdentityCard"; +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +function isIdentityCard(value, locale) { + return typeof value === "string" && validator.isIdentityCard(value, locale); +} +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +function IsIdentityCard(locale, validationOptions) { + return ValidateBy({ + name: IS_IDENTITY_CARD, + constraints: [locale], + validator: { + validate: (value, args) => isIdentityCard(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a identity card number", validationOptions) + } + }, validationOptions); +} + +const IS_ISRC = "isISRC"; +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +function isISRC(value) { + return typeof value === "string" && validator.isISRC(value); +} +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +function IsISRC(validationOptions) { + return ValidateBy({ + name: IS_ISRC, + validator: { + validate: (value, args) => isISRC(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ISRC", validationOptions) + } + }, validationOptions); +} + +const IS_LOCALE = "isLocale"; +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +function isLocale(value) { + return typeof value === "string" && validator.isLocale(value); +} +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +function IsLocale(validationOptions) { + return ValidateBy({ + name: IS_LOCALE, + validator: { + validate: (value, args) => isLocale(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be locale", validationOptions) + } + }, validationOptions); +} + +const IS_MAGNET_URI = "isMagnetURI"; +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +function isMagnetURI(value) { + return typeof value === "string" && validator.isMagnetURI(value); +} +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +function IsMagnetURI(validationOptions) { + return ValidateBy({ + name: IS_MAGNET_URI, + validator: { + validate: (value, args) => isMagnetURI(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be magnet uri format", validationOptions) + } + }, validationOptions); +} + +const IS_MIME_TYPE = "isMimeType"; +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +function isMimeType(value) { + return typeof value === "string" && validator.isMimeType(value); +} +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +function IsMimeType(validationOptions) { + return ValidateBy({ + name: IS_MIME_TYPE, + validator: { + validate: (value, args) => isMimeType(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be MIME type format", validationOptions) + } + }, validationOptions); +} + +const IS_OCTAL = "isOctal"; +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +function isOctal(value) { + return typeof value === "string" && validator.isOctal(value); +} +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +function IsOctal(validationOptions) { + return ValidateBy({ + name: IS_OCTAL, + validator: { + validate: (value, args) => isOctal(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be valid octal number", validationOptions) + } + }, validationOptions); +} + +const IS_PASSPORT_NUMBER = "isPassportNumber"; +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +function isPassportNumber(value, countryCode) { + return typeof value === "string" && validator.isPassportNumber(value, countryCode); +} +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +function IsPassportNumber(countryCode, validationOptions) { + return ValidateBy({ + name: IS_PASSPORT_NUMBER, + constraints: [countryCode], + validator: { + validate: (value, args) => isPassportNumber(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be valid passport number", validationOptions) + } + }, validationOptions); +} + +const IS_POSTAL_CODE = "isPostalCode"; +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +function isPostalCode(value, locale) { + return typeof value === "string" && validator.isPostalCode(value, locale); +} +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +function IsPostalCode(locale, validationOptions) { + return ValidateBy({ + name: IS_POSTAL_CODE, + constraints: [locale], + validator: { + validate: (value, args) => isPostalCode(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a postal code", validationOptions) + } + }, validationOptions); +} + +const IS_RFC_3339 = "isRFC3339"; +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +function isRFC3339(value) { + return typeof value === "string" && validator.isRFC3339(value); +} +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +function IsRFC3339(validationOptions) { + return ValidateBy({ + name: IS_RFC_3339, + validator: { + validate: (value, args) => isRFC3339(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be RFC 3339 date", validationOptions) + } + }, validationOptions); +} + +const IS_RGB_COLOR = "isRgbColor"; +/** +* Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +function isRgbColor(value, includePercentValues) { + return typeof value === "string" && validator.isRgbColor(value, includePercentValues); +} +/** + * Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +function IsRgbColor(includePercentValues, validationOptions) { + return ValidateBy({ + name: IS_RGB_COLOR, + constraints: [includePercentValues], + validator: { + validate: (value, args) => isRgbColor(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be RGB color", validationOptions) + } + }, validationOptions); +} + +const IS_SEM_VER = "isSemVer"; +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +function isSemVer(value) { + return typeof value === "string" && validator.isSemVer(value); +} +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +function IsSemVer(validationOptions) { + return ValidateBy({ + name: IS_SEM_VER, + validator: { + validate: (value, args) => isSemVer(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a Semantic Versioning Specification", validationOptions) + } + }, validationOptions); +} + +const IS_BOOLEAN = "isBoolean"; +/** + * Checks if a given value is a number. + */ +function isBoolean(value) { + return value instanceof Boolean || typeof value === "boolean"; +} +/** + * Checks if a value is a number. + */ +function IsBoolean(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN, + validator: { + validate: (value, args) => isBoolean(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a boolean value", validationOptions) + } + }, validationOptions); +} + +const IS_DATE = "isDate"; +/** + * Checks if a given value is a number. + */ +function isDate(value) { + return value instanceof Date && !isNaN(value.getTime()); +} +/** + * Checks if a value is a number. + */ +function IsDate(validationOptions) { + return ValidateBy({ + name: IS_DATE, + validator: { + validate: (value, args) => isDate(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a Date instance", validationOptions) + } + }, validationOptions); +} + +const IS_NUMBER = "isNumber"; +/** + * Checks if a given value is a number. + */ +function isNumber(value, options = {}) { + if (typeof value !== "number") { + return false; + } + if (value === Infinity || value === -Infinity) { + return options.allowInfinity; + } + if (Number.isNaN(value)) { + return options.allowNaN; + } + if (options.maxDecimalPlaces !== undefined) { + let decimalPlaces = 0; + if ((value % 1) !== 0) { + decimalPlaces = value.toString().split(".")[1].length; + } + if (decimalPlaces > options.maxDecimalPlaces) { + return false; + } + } + return Number.isFinite(value); +} +/** + * Checks if a value is a number. + */ +function IsNumber(options = {}, validationOptions) { + return ValidateBy({ + name: IS_NUMBER, + constraints: [options], + validator: { + validate: (value, args) => isNumber(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a number conforming to the specified constraints", validationOptions) + } + }, validationOptions); +} + +const IS_ENUM = "isEnum"; +/** + * Checks if a given value is an enum + */ +function isEnum(value, entity) { + const enumValues = Object.keys(entity) + .map(k => entity[k]); + return enumValues.indexOf(value) >= 0; +} +/** + * Checks if a given value is an enum + */ +function IsEnum(entity, validationOptions) { + return ValidateBy({ + name: IS_ENUM, + constraints: [entity], + validator: { + validate: (value, args) => isEnum(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid enum value", validationOptions) + } + }, validationOptions); +} + +const IS_INT = "isInt"; +/** + * Checks if value is an integer. + */ +function isInt(val) { + return typeof val === "number" && Number.isInteger(val); +} +/** + * Checks if value is an integer. + */ +function IsInt(validationOptions) { + return ValidateBy({ + name: IS_INT, + validator: { + validate: (value, args) => isInt(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an integer number", validationOptions) + } + }, validationOptions); +} + +const IS_STRING = "isString"; +/** +* Checks if a given value is a real string. +*/ +function isString(value) { + return value instanceof String || typeof value === "string"; +} +/** +* Checks if a given value is a real string. +*/ +function IsString(validationOptions) { + return ValidateBy({ + name: IS_STRING, + validator: { + validate: (value, args) => isString(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a string", validationOptions) + } + }, validationOptions); +} + +const IS_ARRAY = "isArray"; +/** + * Checks if a given value is an array + */ +function isArray(value) { + return value instanceof Array; +} +/** + * Checks if a given value is an array + */ +function IsArray(validationOptions) { + return ValidateBy({ + name: IS_ARRAY, + validator: { + validate: (value, args) => isArray(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an array", validationOptions) + } + }, validationOptions); +} + +const IS_OBJECT = "isObject"; +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +function isObject(value) { + return value != null && (typeof value === "object" || typeof value === "function") && !Array.isArray(value); +} +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +function IsObject(validationOptions) { + return ValidateBy({ + name: IS_OBJECT, + validator: { + validate: (value, args) => isObject(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an object", validationOptions) + } + }, validationOptions); +} + +const ARRAY_CONTAINS = "arrayContains"; +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +function arrayContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(value => array.indexOf(value) !== -1); +} +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +function ArrayContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_CONTAINS, + constraints: [values], + validator: { + validate: (value, args) => arrayContains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain $constraint1 values", validationOptions) + } + }, validationOptions); +} + +const ARRAY_NOT_CONTAINS = "arrayNotContains"; +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +function arrayNotContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(value => array.indexOf(value) === -1); +} +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +function ArrayNotContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_CONTAINS, + constraints: [values], + validator: { + validate: (value, args) => arrayNotContains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not contain $constraint1 values", validationOptions) + } + }, validationOptions); +} + +const ARRAY_NOT_EMPTY = "arrayNotEmpty"; +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +function arrayNotEmpty(array) { + return array instanceof Array && array.length > 0; +} +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +function ArrayNotEmpty(validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_EMPTY, + validator: { + validate: (value, args) => arrayNotEmpty(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be empty", validationOptions) + } + }, validationOptions); +} + +const ARRAY_MIN_SIZE = "arrayMinSize"; +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +function arrayMinSize(array, min) { + return array instanceof Array && array.length >= min; +} +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +function ArrayMinSize(min, validationOptions) { + return ValidateBy({ + name: ARRAY_MIN_SIZE, + constraints: [min], + validator: { + validate: (value, args) => arrayMinSize(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain at least $constraint1 elements", validationOptions) + } + }, validationOptions); +} + +const ARRAY_MAX_SIZE = "arrayMaxSize"; +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +function arrayMaxSize(array, max) { + return array instanceof Array && array.length <= max; +} +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +function ArrayMaxSize(max, validationOptions) { + return ValidateBy({ + name: ARRAY_MAX_SIZE, + constraints: [max], + validator: { + validate: (value, args) => arrayMaxSize(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain not more than $constraint1 elements", validationOptions) + } + }, validationOptions); +} + +const ARRAY_UNIQUE = "arrayUnique"; +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +function arrayUnique(array) { + if (!(array instanceof Array)) + return false; + const uniqueItems = array.filter((a, b, c) => c.indexOf(a) === b); + return array.length === uniqueItems.length; +} +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +function ArrayUnique(validationOptions) { + return ValidateBy({ + name: ARRAY_UNIQUE, + validator: { + validate: (value, args) => arrayUnique(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "All $property's elements must be unique", validationOptions) + } + }, validationOptions); +} + +const IS_NOT_EMPTY_OBJECT = "isNotEmptyObject"; +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +function isNotEmptyObject(value) { + if (!isObject(value)) { + return false; + } + for (const key in value) { + if (value.hasOwnProperty(key)) { + return true; + } + } + return false; +} +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +function IsNotEmptyObject(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY_OBJECT, + validator: { + validate: (value, args) => isNotEmptyObject(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a non-empty object", validationOptions) + } + }, validationOptions); +} + +const IS_INSTANCE = "isInstance"; +/** + * Checks if the value is an instance of the specified object. + */ +function isInstance(object, targetTypeConstructor) { + return targetTypeConstructor + && typeof targetTypeConstructor === "function" + && object instanceof targetTypeConstructor; +} +/** + * Checks if the value is an instance of the specified object. + */ +function IsInstance(targetType, validationOptions) { + return ValidateBy({ + name: IS_INSTANCE, + constraints: [targetType], + validator: { + validate: (value, args) => isInstance(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix, args) => { + if (args.constraints[0]) { + return eachPrefix + `$property must be an instance of ${args.constraints[0].name}`; + } + else { + return eachPrefix + `${IS_INSTANCE} decorator expects and object as value, but got falsy value.`; + } + }, validationOptions) + } + }, validationOptions); +} + +/** + * Validates given object by object's decorators or given validation schema. + */ +function validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Validates given object by object's decorators or given validation schema and reject on error. + */ +function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Validates given object by object's decorators or given validation schema. + * Note that this method completely ignores async validations. + * If you want to properly perform validation you need to call validate method instead. + */ +function validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Registers a new validation schema. + */ +function registerSchema(schema) { + getMetadataStorage().addValidationSchema(schema); +} + +export { ARRAY_CONTAINS, ARRAY_MAX_SIZE, ARRAY_MIN_SIZE, ARRAY_NOT_CONTAINS, ARRAY_NOT_EMPTY, ARRAY_UNIQUE, Allow, ArrayContains, ArrayMaxSize, ArrayMinSize, ArrayNotContains, ArrayNotEmpty, ArrayUnique, CONTAINS, Contains, EQUALS, Equals, IS_ALPHA, IS_ALPHANUMERIC, IS_ARRAY, IS_ASCII, IS_BASE32, IS_BASE64, IS_BIC, IS_BOOLEAN, IS_BOOLEAN_STRING, IS_BTC_ADDRESS, IS_BYTE_LENGTH, IS_CREDIT_CARD, IS_CURRENCY, IS_DATA_URI, IS_DATE, IS_DATE_STRING, IS_DECIMAL, IS_DEFINED, IS_DIVISIBLE_BY, IS_EAN, IS_EMAIL, IS_EMPTY, IS_ENUM, IS_ETHEREUM_ADDRESS, IS_FIREBASE_PUSH_ID, IS_FQDN, IS_FULL_WIDTH, IS_HALF_WIDTH, IS_HASH, IS_HEXADECIMAL, IS_HEX_COLOR, IS_HSL, IS_IBAN, IS_IDENTITY_CARD, IS_IN, IS_INSTANCE, IS_INT, IS_IP, IS_ISBN, IS_ISIN, IS_ISO31661_ALPHA_2, IS_ISO31661_ALPHA_3, IS_ISO8601, IS_ISRC, IS_ISSN, IS_JSON, IS_JWT, IS_LATITUDE, IS_LATLONG, IS_LOCALE, IS_LONGITUDE, IS_LOWERCASE, IS_MAC_ADDRESS, IS_MAGNET_URI, IS_MILITARY_TIME, IS_MIME_TYPE, IS_MOBILE_PHONE, IS_MONGO_ID, IS_MULTIBYTE, IS_NEGATIVE, IS_NOT_EMPTY, IS_NOT_EMPTY_OBJECT, IS_NOT_IN, IS_NUMBER, IS_NUMBER_STRING, IS_OBJECT, IS_OCTAL, IS_PASSPORT_NUMBER, IS_PHONE_NUMBER, IS_PORT, IS_POSITIVE, IS_POSTAL_CODE, IS_RFC_3339, IS_RGB_COLOR, IS_SEM_VER, IS_STRING, IS_SURROGATE_PAIR, IS_UPPERCASE, IS_URL, IS_UUID, IS_VARIABLE_WIDTH, IsAlpha, IsAlphanumeric, IsArray, IsAscii, IsBIC, IsBase32, IsBase64, IsBoolean, IsBooleanString, IsBtcAddress, IsByteLength, IsCreditCard, IsCurrency, IsDataURI, IsDate, IsDateString, IsDecimal, IsDefined, IsDivisibleBy, IsEAN, IsEmail, IsEmpty, IsEnum, IsEthereumAddress, IsFQDN, IsFirebasePushId, IsFullWidth, IsHSL, IsHalfWidth, IsHash, IsHexColor, IsHexadecimal, IsIBAN, IsIP, IsISBN, IsISIN, IsISO31661Alpha2, IsISO31661Alpha3, IsISO8601, IsISRC, IsISSN, IsIdentityCard, IsIn, IsInstance, IsInt, IsJSON, IsJWT, IsLatLong, IsLatitude, IsLocale, IsLongitude, IsLowercase, IsMACAddress, IsMagnetURI, IsMilitaryTime, IsMimeType, IsMobilePhone, IsMongoId, IsMultibyte, IsNegative, IsNotEmpty, IsNotEmptyObject, IsNotIn, IsNumber, IsNumberString, IsObject, IsOctal, IsOptional, IsPassportNumber, IsPhoneNumber, IsPort, IsPositive, IsPostalCode, IsRFC3339, IsRgbColor, IsSemVer, IsString, IsSurrogatePair, IsUUID, IsUppercase, IsUrl, IsVariableWidth, LENGTH, Length, MATCHES, MAX, MAX_DATE, MAX_LENGTH, MIN, MIN_DATE, MIN_LENGTH, Matches, Max, MaxDate, MaxLength, MetadataStorage, Min, MinDate, MinLength, NOT_CONTAINS, NOT_EQUALS, NotContains, NotEquals, Validate, ValidateBy, ValidateIf, ValidateNested, ValidatePromise, ValidationError, ValidationTypes, Validator, ValidatorConstraint, arrayContains, arrayMaxSize, arrayMinSize, arrayNotContains, arrayNotEmpty, arrayUnique, buildMessage, contains, equals, getFromContainer, getMetadataStorage, isAlpha, isAlphanumeric, isArray, isAscii, isBIC, isBase32, isBase64, isBoolean, isBooleanString, isBtcAddress, isByteLength, isCreditCard, isCurrency, isDataURI, isDate, isDateString, isDecimal, isDefined, isDivisibleBy, isEAN, isEmail, isEmpty, isEnum, isEthereumAddress, isFQDN, isFirebasePushId, isFullWidth, isHSL, isHalfWidth, isHash, isHexColor, isHexadecimal, isIBAN, isIP, isISBN, isISIN, isISO31661Alpha2, isISO31661Alpha3, isISO8601, isISRC, isISSN, isIdentityCard, isIn, isInstance, isInt, isJSON, isJWT, isLatLong, isLatitude, isLocale, isLongitude, isLowercase, isMACAddress, isMagnetURI, isMilitaryTime, isMimeType, isMobilePhone, isMongoId, isMultibyte, isNegative, isNotEmpty, isNotEmptyObject, isNotIn, isNumber, isNumberString, isObject, isOctal, isPassportNumber, isPhoneNumber, isPort, isPositive, isPostalCode, isRFC3339, isRgbColor, isSemVer, isString, isSurrogatePair, isURL, isUUID, isUppercase, isValidationOptions, isVariableWidth, length, matches, max, maxDate, maxLength, min, minDate, minLength, notContains, notEquals, registerDecorator, registerSchema, useContainer, validate, validateOrReject, validateSync }; +//# sourceMappingURL=index.esm.js.map diff --git a/src/node_modules/class-validator/bundles/index.esm.js.map b/src/node_modules/class-validator/bundles/index.esm.js.map new file mode 100644 index 0000000..23385d2 --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.esm.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/decorator/common/Allow.ts","../../src/metadata/ConstraintMetadata.ts","../../src/register-decorator.ts","../../src/decorator/common/ValidateBy.ts","../../src/decorator/common/IsDefined.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/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/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 { 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 {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 { 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 { 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 {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":["ValidatorJ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,CAAC,MAAwB;IACnD,kBAAkB,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC;;;;"} \ No newline at end of file diff --git a/src/node_modules/class-validator/bundles/index.esm.min.js b/src/node_modules/class-validator/bundles/index.esm.min.js new file mode 100644 index 0000000..c92814e --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.esm.min.js @@ -0,0 +1,2 @@ +import t from"validator";import{PhoneNumberUtil as n}from"google-libphonenumber";class e{constructor(t){this.groups=[],this.always=!1,this.each=!1,this.context=void 0,this.type=t.type,this.target=t.target,this.propertyName=t.propertyName,this.constraints=t.constraints,this.constraintCls=t.constraintCls,this.validationTypeOptions=t.validationTypeOptions,t.validationOptions&&(this.message=t.validationOptions.message,this.groups=t.validationOptions.groups,this.always=t.validationOptions.always,this.each=t.validationOptions.each,this.context=t.validationOptions.context)}}class a{transform(t){const n=[];return Object.keys(t.properties).forEach(a=>{t.properties[a].forEach(r=>{const i={message:r.message,groups:r.groups,always:r.always,each:r.each},s={type:r.type,target:t.name,propertyName:a,constraints:r.constraints,validationTypeOptions:r.options,validationOptions:i};n.push(new e(s))})}),n}}function r(){return"undefined"!=typeof window&&(window.global=window),global.classValidatorMetadataStorage||(global.classValidatorMetadataStorage=new i),global.classValidatorMetadataStorage}class i{constructor(){this.validationMetadatas=[],this.constraintMetadatas=[]}get hasValidationMetaData(){return!!this.validationMetadatas.length}addValidationSchema(t){(new a).transform(t).forEach(t=>this.addValidationMetadata(t))}addValidationMetadata(t){this.validationMetadatas.push(t)}addConstraintMetadata(t){this.constraintMetadatas.push(t)}groupByPropertyName(t){const n={};return t.forEach(t=>{n[t.propertyName]||(n[t.propertyName]=[]),n[t.propertyName].push(t)}),n}getTargetValidationMetadatas(t,n,e){const a=this.validationMetadatas.filter(a=>(a.target===t||a.target===n)&&(!!a.always||(!(e&&e.length>0)||a.groups&&!!a.groups.find(t=>-1!==e.indexOf(t))))),r=this.validationMetadatas.filter(n=>"string"!=typeof n.target&&(n.target!==t&&((!(n.target instanceof Function)||t.prototype instanceof n.target)&&(!!n.always||(!(e&&e.length>0)||n.groups&&!!n.groups.find(t=>-1!==e.indexOf(t))))))).filter(t=>!a.find(n=>n.propertyName===t.propertyName&&n.type===t.type));return a.concat(r)}getTargetValidatorConstraints(t){return this.constraintMetadatas.filter(n=>n.target===t)}}class s{toString(t=!1,n=!1,e=""){const a=t?"":"",r=t?"":"",i=t=>` - property ${a}${e}${t}${r} has failed the following constraints: ${a}${Object.keys(this.constraints).join(", ")}${r} \n`;if(n){const n=Number.isInteger(+this.property)?`[${this.property}]`:`${e?".":""}${this.property}`;return this.constraints?i(n):this.children.map(a=>a.toString(t,!0,`${e}${n}`)).join("")}return`An instance of ${a}${this.target?this.target.constructor.name:"an object"}${r} has failed the validation:\n`+(this.constraints?i(this.property):"")+this.children.map(n=>n.toString(t,!0,this.property)).join("")}}class o{static isValid(t){return"isValid"!==t&&"getMessage"!==t&&-1!==Object.keys(this).map(t=>this[t]).indexOf(t)}}o.CUSTOM_VALIDATION="customValidation",o.NESTED_VALIDATION="nestedValidation",o.PROMISE_VALIDATION="promiseValidation",o.CONDITIONAL_VALIDATION="conditionalValidation",o.WHITELIST="whitelistValidation",o.IS_DEFINED="isDefined";function c(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}class u{constructor(t,n){this.validator=t,this.validatorOptions=n,this.awaitingPromises=[],this.ignoreAsyncValidations=!1,this.metadataStorage=r()}execute(t,n,e){this.metadataStorage.hasValidationMetaData||console.warn("No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies.");const a=this.validatorOptions?this.validatorOptions.groups:void 0,r=this.metadataStorage.getTargetValidationMetadatas(t.constructor,n,a),i=this.metadataStorage.groupByPropertyName(r);if(this.validatorOptions&&this.validatorOptions.forbidUnknownValues&&!r.length){const n=new s;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(n.target=t),n.value=void 0,n.property=void 0,n.children=[],n.constraints={unknownValue:"an unknown value was passed to the validate function"},void e.push(n)}this.validatorOptions&&this.validatorOptions.whitelist&&this.whitelist(t,i,e),Object.keys(i).forEach(n=>{const a=t[n],r=i[n].filter(t=>t.type===o.IS_DEFINED),s=i[n].filter(t=>t.type!==o.IS_DEFINED&&t.type!==o.WHITELIST);a instanceof Promise&&s.find(t=>t.type===o.PROMISE_VALIDATION)?this.awaitingPromises.push(a.then(a=>{this.performValidations(t,a,n,r,s,e)})):this.performValidations(t,a,n,r,s,e)})}whitelist(t,n,e){let a=[];Object.keys(t).forEach(t=>{n[t]&&0!==n[t].length||a.push(t)}),a.length>0&&(this.validatorOptions&&this.validatorOptions.forbidNonWhitelisted?a.forEach(n=>{const a=this.generateValidationError(t,t[n],n);a.constraints={[o.WHITELIST]:`property ${n} should not exist`},a.children=void 0,e.push(a)}):a.forEach(n=>delete t[n]))}stripEmptyErrors(t){return t.filter(t=>{if(t.children&&(t.children=this.stripEmptyErrors(t.children)),0===Object.keys(t.constraints).length){if(0===t.children.length)return!1;delete t.constraints}return!0})}performValidations(t,n,e,a,r,i){const s=r.filter(t=>t.type===o.CUSTOM_VALIDATION),c=r.filter(t=>t.type===o.NESTED_VALIDATION),u=r.filter(t=>t.type===o.CONDITIONAL_VALIDATION),l=this.generateValidationError(t,n,e);i.push(l),this.conditionalValidations(t,n,u)&&(this.customValidations(t,n,a,l),this.mapContexts(t,n,a,l),void 0===n&&this.validatorOptions&&!0===this.validatorOptions.skipUndefinedProperties||null===n&&this.validatorOptions&&!0===this.validatorOptions.skipNullProperties||null==n&&this.validatorOptions&&!0===this.validatorOptions.skipMissingProperties||(this.customValidations(t,n,s,l),this.nestedValidations(n,c,l.children),this.mapContexts(t,n,r,l),this.mapContexts(t,n,s,l)))}generateValidationError(t,n,e){const a=new s;return this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.target&&!0!==this.validatorOptions.validationError.target||(a.target=t),this.validatorOptions&&this.validatorOptions.validationError&&void 0!==this.validatorOptions.validationError.value&&!0!==this.validatorOptions.validationError.value||(a.value=n),a.property=e,a.children=[],a.constraints={},a}conditionalValidations(t,n,e){return e.map(e=>e.constraints[0](t,n)).reduce((t,n)=>t&&n,!0)}customValidations(t,n,e,a){e.forEach(e=>{this.metadataStorage.getTargetValidatorConstraints(e.constraintCls).forEach(r=>{if(r.async&&this.ignoreAsyncValidations)return;const i={targetName:t.constructor?t.constructor.name:void 0,property:e.propertyName,object:t,value:n,constraints:e.constraints};if(!e.each||!(n instanceof Array||n instanceof Set||n instanceof Map)){const s=r.instance.validate(n,i);if(c(s)){const i=s.then(i=>{if(!i){const[i,s]=this.createValidationError(t,n,e,r);a.constraints[i]=s,e.context&&(a.contexts||(a.contexts={}),a.contexts[i]=Object.assign(a.contexts[i]||{},e.context))}});this.awaitingPromises.push(i)}else if(!s){const[i,s]=this.createValidationError(t,n,e,r);a.constraints[i]=s}return}var s;const o=((s=n)instanceof Map?Array.from(s.values()):Array.isArray(s)?s:Array.from(s)).map(t=>r.instance.validate(t,i));if(o.some(t=>c(t))){const i=o.map(t=>c(t)?t:Promise.resolve(t)),s=Promise.all(i).then(i=>{if(!i.every(t=>t)){const[i,s]=this.createValidationError(t,n,e,r);a.constraints[i]=s,e.context&&(a.contexts||(a.contexts={}),a.contexts[i]=Object.assign(a.contexts[i]||{},e.context))}});this.awaitingPromises.push(s)}else if(!o.every(t=>t)){const[i,s]=this.createValidationError(t,n,e,r);a.constraints[i]=s}})})}nestedValidations(t,n,e){void 0!==t&&n.forEach(a=>{if(a.type===o.NESTED_VALIDATION||a.type===o.PROMISE_VALIDATION)if(t instanceof Array||t instanceof Set||t instanceof Map){(t instanceof Set?Array.from(t):t).forEach((a,r)=>{this.performValidations(t,a,r.toString(),[],n,e)})}else if(t instanceof Object){const n="string"==typeof a.target?a.target:a.target.name;this.execute(t,n,e)}else{const n=new s;n.value=t,n.property=a.propertyName,n.target=a.target;const[r,i]=this.createValidationError(a.target,t,a);n.constraints={[r]:i},e.push(n)}})}mapContexts(t,n,e,a){return e.forEach(t=>{if(t.context){let n;if(t.type===o.CUSTOM_VALIDATION){n=this.metadataStorage.getTargetValidatorConstraints(t.constraintCls)[0]}const e=this.getConstraintType(t,n);a.constraints[e]&&(a.contexts||(a.contexts={}),a.contexts[e]=Object.assign(a.contexts[e]||{},t.context))}})}createValidationError(t,n,e,a){const r=t.constructor?t.constructor.name:void 0,i=this.getConstraintType(e,a),s={targetName:r,property:e.propertyName,object:t,value:n,constraints:e.constraints};let o=e.message||"";return e.message||this.validatorOptions&&(!this.validatorOptions||this.validatorOptions.dismissDefaultMessages)||a&&a.instance.defaultMessage instanceof Function&&(o=a.instance.defaultMessage(s)),[i,class{static replaceMessageSpecialTokens(t,n){let e;return t instanceof Function?e=t(n):"string"==typeof t&&(e=t),e&&n.constraints instanceof Array&&n.constraints.forEach((t,n)=>{e=e.replace(new RegExp(`\\$constraint${n+1}`,"g"),t)}),e&&void 0!==n.value&&null!==n.value&&"string"==typeof n.value&&(e=e.replace(/\$value/g,n.value)),e&&(e=e.replace(/\$property/g,n.property)),e&&(e=e.replace(/\$target/g,n.targetName)),e}}.replaceMessageSpecialTokens(o,s)]}getConstraintType(t,n){return n&&n.name?n.name:t.type}}class l{coreValidate(t,n,e){const a="string"==typeof t?n:t,r="string"==typeof t?t:void 0,i=new u(this,"string"==typeof t?e:n),s=[];return i.execute(a,r,s),Promise.all(i.awaitingPromises).then(()=>i.stripEmptyErrors(s))}validate(t,n,e){return this.coreValidate(t,n,e)}async validateOrReject(t,n,e){const a=await this.coreValidate(t,n,e);if(a.length)return Promise.reject(a)}validateSync(t,n,e){const a="string"==typeof t?n:t,r="string"==typeof t?t:void 0,i=new u(this,"string"==typeof t?e:n);i.ignoreAsyncValidations=!0;const s=[];return i.execute(a,r,s),i.stripEmptyErrors(s)}}const d=new class{constructor(){this.instances=[]}get(t){let n=this.instances.find(n=>n.type===t);return n||(n={type:t,object:new t},this.instances.push(n)),n.object}};let p,f;function m(t,n){p=t,f=n}function g(t){if(p)try{const n=p.get(t);if(n)return n;if(!f||!f.fallback)return n}catch(t){if(!f||!f.fallbackOnErrors)throw t}return d.get(t)}function y(t){return function(n,a){const i={type:o.WHITELIST,target:n.constructor,propertyName:a,validationOptions:t};r().addValidationMetadata(new e(i))}}class v{constructor(t,n,e=!1){this.target=t,this.name=n,this.async=e}get instance(){return g(this.target)}}function h(t){let n;if(t.validator instanceof Function){if(n=t.validator,g(i).getTargetValidatorConstraints(t.validator).length>1)throw`More than one implementation of ValidatorConstraintInterface found for validator on: ${t.target}:${t.propertyName}`}else{const e=t.validator;n=class{validate(t,n){return e.validate(t,n)}defaultMessage(t){return e.defaultMessage?e.defaultMessage(t):""}},r().addConstraintMetadata(new v(n,t.name,t.async))}const a={type:t.name&&o.isValid(t.name)?t.name:o.CUSTOM_VALIDATION,target:t.target,propertyName:t.propertyName,validationOptions:t.options,constraintCls:n,constraints:t.constraints};r().addValidationMetadata(new e(a))}function b(t,n){return e=>{const a=n&&n.each?"each value in ":"";return t(a,e)}}function M(t,n){return function(e,a){h({name:t.name,target:e.constructor,propertyName:a,options:n,constraints:t.constraints,validator:t.validator})}}const $=o.IS_DEFINED;function I(t){return null!=t}function O(t){return M({name:$,validator:{validate:t=>I(t),defaultMessage:b(t=>t+"$property should not be null or undefined",t)}},t)}function N(t){return function(n,a){const i={type:o.CONDITIONAL_VALIDATION,target:n.constructor,propertyName:a,constraints:[(t,n)=>null!==t[a]&&void 0!==t[a]],validationOptions:t};r().addValidationMetadata(new e(i))}}function A(t){return function(n){const e=!(!t||!t.async);let a=t&&t.name?t.name:"";a||(a=n.name,a||(a=a.replace(/\.?([A-Z]+)/g,(t,n)=>"_"+n.toLowerCase()).replace(/^_/,"")));const i=new v(n,a,e);r().addConstraintMetadata(i)}}function S(t,n,a){return function(i,s){const c={type:o.CUSTOM_VALIDATION,target:i.constructor,propertyName:s,constraintCls:t,constraints:n instanceof Array?n:void 0,validationOptions:n instanceof Array?a:n};r().addValidationMetadata(new e(c))}}function E(t,n){return function(a,i){const s={type:o.CONDITIONAL_VALIDATION,target:a.constructor,propertyName:i,constraints:[t],validationOptions:n};r().addValidationMetadata(new e(s))}}function V(t){const n={...t},a=n.each?"each value in ":"";return n.message=n.message||a+"nested property $property must be either object or array",function(t,a){const i={type:o.NESTED_VALIDATION,target:t.constructor,propertyName:a,validationOptions:n};r().addValidationMetadata(new e(i))}}function C(t){return function(n,a){const i={type:o.PROMISE_VALIDATION,target:n.constructor,propertyName:a,validationOptions:t};r().addValidationMetadata(new e(i))}}const w="isLatLong";function T(n){return"string"==typeof n&&t.isLatLong(n)}function x(t){return M({name:"isLatLong",validator:{validate:(t,n)=>T(t),defaultMessage:b(t=>t+"$property must be a latitude,longitude string",t)}},t)}const D="isLatitude";function L(t){return("number"==typeof t||"string"==typeof t)&&T(`${t},0`)}function P(t){return M({name:"isLatitude",validator:{validate:(t,n)=>L(t),defaultMessage:b(t=>t+"$property must be a latitude string or number",t)}},t)}const j="isLongitude";function B(t){return("number"==typeof t||"string"==typeof t)&&T(`0,${t}`)}function R(t){return M({name:"isLongitude",validator:{validate:(t,n)=>B(t),defaultMessage:b(t=>t+"$property must be a longitude string or number",t)}},t)}const U="equals";function _(t,n){return t===n}function F(t,n){return M({name:"equals",constraints:[t],validator:{validate:(t,n)=>_(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be equal to $constraint1",n)}},n)}const H="notEquals";function k(t,n){return t!==n}function q(t,n){return M({name:"notEquals",constraints:[t],validator:{validate:(t,n)=>k(t,n.constraints[0]),defaultMessage:b(t=>t+"$property should not be equal to $constraint1",n)}},n)}const W="isEmpty";function z(t){return""===t||null==t}function J(t){return M({name:"isEmpty",validator:{validate:(t,n)=>z(t),defaultMessage:b(t=>t+"$property must be empty",t)}},t)}const Z="isNotEmpty";function G(t){return""!==t&&null!=t}function K(t){return M({name:"isNotEmpty",validator:{validate:(t,n)=>G(t),defaultMessage:b(t=>t+"$property should not be empty",t)}},t)}const Q="isIn";function Y(t,n){return!(n instanceof Array)||n.some(n=>n===t)}function X(t,n){return M({name:"isIn",constraints:[t],validator:{validate:(t,n)=>Y(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be one of the following values: $constraint1",n)}},n)}const tt="isNotIn";function nt(t,n){return!(n instanceof Array&&n.some(n=>n===t))}function et(t,n){return M({name:"isNotIn",constraints:[t],validator:{validate:(t,n)=>nt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property should not be one of the following values: $constraint1",n)}},n)}const at="isDivisibleBy";function rt(n,e){return"number"==typeof n&&"number"==typeof e&&t.isDivisibleBy(String(n),e)}function it(t,n){return M({name:"isDivisibleBy",constraints:[t],validator:{validate:(t,n)=>rt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be divisible by $constraint1",n)}},n)}const st="isPositive";function ot(t){return"number"==typeof t&&t>0}function ct(t){return M({name:"isPositive",validator:{validate:(t,n)=>ot(t),defaultMessage:b(t=>t+"$property must be a positive number",t)}},t)}const ut="isNegative";function lt(t){return"number"==typeof t&&t<0}function dt(t){return M({name:"isNegative",validator:{validate:(t,n)=>lt(t),defaultMessage:b(t=>t+"$property must be a negative number",t)}},t)}const pt="max";function ft(t,n){return"number"==typeof t&&"number"==typeof n&&t<=n}function mt(t,n){return M({name:"max",constraints:[t],validator:{validate:(t,n)=>ft(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must not be greater than $constraint1",n)}},n)}const gt="min";function yt(t,n){return"number"==typeof t&&"number"==typeof n&&t>=n}function vt(t,n){return M({name:"min",constraints:[t],validator:{validate:(t,n)=>yt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must not be less than $constraint1",n)}},n)}const ht="minDate";function bt(t,n){return t instanceof Date&&t.getTime()>=n.getTime()}function Mt(t,n){return M({name:"minDate",constraints:[t],validator:{validate:(t,n)=>bt(t,n.constraints[0]),defaultMessage:b(t=>"minimal allowed date for "+t+"$property is $constraint1",n)}},n)}const $t="maxDate";function It(t,n){return t instanceof Date&&t.getTime()<=n.getTime()}function Ot(t,n){return M({name:"maxDate",constraints:[t],validator:{validate:(t,n)=>It(t,n.constraints[0]),defaultMessage:b(t=>"maximal allowed date for "+t+"$property is $constraint1",n)}},n)}const Nt="contains";function At(n,e){return"string"==typeof n&&t.contains(n,e)}function St(t,n){return M({name:"contains",constraints:[t],validator:{validate:(t,n)=>At(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must contain a $constraint1 string",n)}},n)}const Et="notContains";function Vt(n,e){return"string"==typeof n&&!t.contains(n,e)}function Ct(t,n){return M({name:"notContains",constraints:[t],validator:{validate:(t,n)=>Vt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property should not contain a $constraint1 string",n)}},n)}const wt="isAlpha";function Tt(n,e){return"string"==typeof n&&t.isAlpha(n,e)}function xt(t,n){return M({name:"isAlpha",constraints:[t],validator:{validate:(t,n)=>Tt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must contain only letters (a-zA-Z)",n)}},n)}const Dt="isAlphanumeric";function Lt(n,e){return"string"==typeof n&&t.isAlphanumeric(n,e)}function Pt(t,n){return M({name:"isAlphanumeric",constraints:[t],validator:{validate:(t,n)=>Lt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must contain only letters and numbers",n)}},n)}const jt="isDecimal";function Bt(n,e){return"string"==typeof n&&t.isDecimal(n,e)}function Rt(t,n){return M({name:"isDecimal",constraints:[t],validator:{validate:(t,n)=>Bt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property is not a valid decimal number.",n)}},n)}const Ut="isAscii";function _t(n){return"string"==typeof n&&t.isAscii(n)}function Ft(t){return M({name:"isAscii",validator:{validate:(t,n)=>_t(t),defaultMessage:b(t=>t+"$property must contain only ASCII characters",t)}},t)}const Ht="isBase64";function kt(n){return"string"==typeof n&&t.isBase64(n)}function qt(t){return M({name:"isBase64",validator:{validate:(t,n)=>kt(t),defaultMessage:b(t=>t+"$property must be base64 encoded",t)}},t)}const Wt="isByteLength";function zt(n,e,a){return"string"==typeof n&&t.isByteLength(n,{min:e,max:a})}function Jt(t,n,e){return M({name:"isByteLength",constraints:[t,n],validator:{validate:(t,n)=>zt(t,n.constraints[0],n.constraints[1]),defaultMessage:b(t=>t+"$property's byte length must fall into ($constraint1, $constraint2) range",e)}},e)}const Zt="isCreditCard";function Gt(n){return"string"==typeof n&&t.isCreditCard(n)}function Kt(t){return M({name:"isCreditCard",validator:{validate:(t,n)=>Gt(t),defaultMessage:b(t=>t+"$property must be a credit card",t)}},t)}const Qt="isCurrency";function Yt(n,e){return"string"==typeof n&&t.isCurrency(n,e)}function Xt(t,n){return M({name:"isCurrency",constraints:[t],validator:{validate:(t,n)=>Yt(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a currency",n)}},n)}const tn="isEmail";function nn(n,e){return"string"==typeof n&&t.isEmail(n,e)}function en(t,n){return M({name:"isEmail",constraints:[t],validator:{validate:(t,n)=>nn(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be an email",n)}},n)}const an="isFqdn";function rn(n,e){return"string"==typeof n&&t.isFQDN(n,e)}function sn(t,n){return M({name:"isFqdn",constraints:[t],validator:{validate:(t,n)=>rn(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a valid domain name",n)}},n)}const on="isFullWidth";function cn(n){return"string"==typeof n&&t.isFullWidth(n)}function un(t){return M({name:"isFullWidth",validator:{validate:(t,n)=>cn(t),defaultMessage:b(t=>t+"$property must contain a full-width characters",t)}},t)}const ln="isHalfWidth";function dn(n){return"string"==typeof n&&t.isHalfWidth(n)}function pn(t){return M({name:"isHalfWidth",validator:{validate:(t,n)=>dn(t),defaultMessage:b(t=>t+"$property must contain a half-width characters",t)}},t)}const fn="isVariableWidth";function mn(n){return"string"==typeof n&&t.isVariableWidth(n)}function gn(t){return M({name:"isVariableWidth",validator:{validate:(t,n)=>mn(t),defaultMessage:b(t=>t+"$property must contain a full-width and half-width characters",t)}},t)}const yn="isHexColor";function vn(n){return"string"==typeof n&&t.isHexColor(n)}function hn(t){return M({name:"isHexColor",validator:{validate:(t,n)=>vn(t),defaultMessage:b(t=>t+"$property must be a hexadecimal color",t)}},t)}const bn="isHexadecimal";function Mn(n){return"string"==typeof n&&t.isHexadecimal(n)}function $n(t){return M({name:"isHexadecimal",validator:{validate:(t,n)=>Mn(t),defaultMessage:b(t=>t+"$property must be a hexadecimal number",t)}},t)}function In(t){return!!t&&("each"in t||"message"in t||"groups"in t||"always"in t||"context"in t)}const On="isMacAddress";function Nn(n,e){return"string"==typeof n&&t.isMACAddress(n,e)}function An(t,n){const e=In(t)?void 0:t,a=In(t)?t:n;return M({name:"isMacAddress",constraints:[e],validator:{validate:(t,n)=>Nn(t,e),defaultMessage:b(t=>t+"$property must be a MAC Address",a)}},a)}const Sn="isIp";function En(n,e){const a=e?`${e}`:void 0;return"string"==typeof n&&t.isIP(n,a)}function Vn(t,n){return M({name:"isIp",constraints:[t],validator:{validate:(t,n)=>En(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be an ip address",n)}},n)}const Cn="isPort";function wn(n){return"string"==typeof n&&t.isPort(n)}function Tn(t){return M({name:"isPort",validator:{validate:(t,n)=>wn(t),defaultMessage:b(t=>t+"$property must be a port",t)}},t)}const xn="isIsbn";function Dn(n,e){const a=e?`${e}`:void 0;return"string"==typeof n&&t.isISBN(n,a)}function Ln(t,n){return M({name:"isIsbn",constraints:[t],validator:{validate:(t,n)=>Dn(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be an ISBN",n)}},n)}const Pn="isIsin";function jn(n){return"string"==typeof n&&t.isISIN(n)}function Bn(t){return M({name:"isIsin",validator:{validate:(t,n)=>jn(t),defaultMessage:b(t=>t+"$property must be an ISIN (stock/security identifier)",t)}},t)}const Rn="isIso8601";function Un(n,e){return"string"==typeof n&&t.isISO8601(n,e)}function _n(t,n){return M({name:"isIso8601",constraints:[t],validator:{validate:(t,n)=>Un(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a valid ISO 8601 date string",n)}},n)}const Fn="isJson";function Hn(n){return"string"==typeof n&&t.isJSON(n)}function kn(t){return M({name:"isJson",validator:{validate:(t,n)=>Hn(t),defaultMessage:b(t=>t+"$property must be a json string",t)}},t)}const qn="isJwt";function Wn(n){return"string"==typeof n&&t.isJWT(n)}function zn(t){return M({name:"isJwt",validator:{validate:(t,n)=>Wn(t),defaultMessage:b(t=>t+"$property must be a jwt string",t)}},t)}const Jn="isLowercase";function Zn(n){return"string"==typeof n&&t.isLowercase(n)}function Gn(t){return M({name:"isLowercase",validator:{validate:(t,n)=>Zn(t),defaultMessage:b(t=>t+"$property must be a lowercase string",t)}},t)}const Kn="isMobilePhone";function Qn(n,e,a){return"string"==typeof n&&t.isMobilePhone(n,e,a)}function Yn(t,n,e){return M({name:"isMobilePhone",constraints:[t,n],validator:{validate:(t,n)=>Qn(t,n.constraints[0],n.constraints[1]),defaultMessage:b(t=>t+"$property must be a phone number",e)}},e)}const Xn="isISO31661Alpha2";function te(n){return"string"==typeof n&&t.isISO31661Alpha2(n)}function ne(t){return M({name:"isISO31661Alpha2",validator:{validate:(t,n)=>te(t),defaultMessage:b(t=>t+"$property must be a valid ISO31661 Alpha2 code",t)}},t)}const ee="isISO31661Alpha3";function ae(n){return"string"==typeof n&&t.isISO31661Alpha3(n)}function re(t){return M({name:"isISO31661Alpha3",validator:{validate:(t,n)=>ae(t),defaultMessage:b(t=>t+"$property must be a valid ISO31661 Alpha3 code",t)}},t)}const ie="isMongoId";function se(n){return"string"==typeof n&&t.isMongoId(n)}function oe(t){return M({name:"isMongoId",validator:{validate:(t,n)=>se(t),defaultMessage:b(t=>t+"$property must be a mongodb id",t)}},t)}const ce="isMultibyte";function ue(n){return"string"==typeof n&&t.isMultibyte(n)}function le(t){return M({name:"isMultibyte",validator:{validate:(t,n)=>ue(t),defaultMessage:b(t=>t+"$property must contain one or more multibyte chars",t)}},t)}const de="isSurrogatePair";function pe(n){return"string"==typeof n&&t.isSurrogatePair(n)}function fe(t){return M({name:"isSurrogatePair",validator:{validate:(t,n)=>pe(t),defaultMessage:b(t=>t+"$property must contain any surrogate pairs chars",t)}},t)}const me="isUrl";function ge(n,e){return"string"==typeof n&&t.isURL(n,e)}function ye(t,n){return M({name:"isUrl",constraints:[t],validator:{validate:(t,n)=>ge(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be an URL address",n)}},n)}const ve="isUuid";function he(n,e){return"string"==typeof n&&t.isUUID(n,e)}function be(t,n){return M({name:"isUuid",constraints:[t],validator:{validate:(t,n)=>he(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be an UUID",n)}},n)}const Me="IsFirebasePushId";function $e(t){return"string"==typeof t&&20===t.length&&/^[a-zA-Z0-9_-]*$/.test(t)}function Ie(t){return M({name:"IsFirebasePushId",validator:{validate:(t,n)=>$e(t),defaultMessage:b(t=>t+"$property must be a Firebase Push Id",t)}},t)}const Oe="isUppercase";function Ne(n){return"string"==typeof n&&t.isUppercase(n)}function Ae(t){return M({name:"isUppercase",validator:{validate:(t,n)=>Ne(t),defaultMessage:b(t=>t+"$property must be uppercase",t)}},t)}const Se="length";function Ee(n,e,a){return"string"==typeof n&&t.isLength(n,{min:e,max:a})}function Ve(t,n,e){return M({name:"length",constraints:[t,n],validator:{validate:(t,n)=>Ee(t,n.constraints[0],n.constraints[1]),defaultMessage:b((t,n)=>{const e=null!==n.constraints[0]&&void 0!==n.constraints[0],a=null!==n.constraints[1]&&void 0!==n.constraints[1];return e&&(!n.value||n.value.lengthn.constraints[1]?t+"$property must be shorter than or equal to $constraint2 characters":t+"$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"},e)}},e)}const Ce="maxLength";function we(n,e){return"string"==typeof n&&t.isLength(n,{min:0,max:e})}function Te(t,n){return M({name:"maxLength",constraints:[t],validator:{validate:(t,n)=>we(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be shorter than or equal to $constraint1 characters",n)}},n)}const xe="minLength";function De(n,e){return"string"==typeof n&&t.isLength(n,{min:e})}function Le(t,n){return M({name:"minLength",constraints:[t],validator:{validate:(t,n)=>De(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be longer than or equal to $constraint1 characters",n)}},n)}const Pe="matches";function je(n,e,a){return"string"==typeof n&&t.matches(n,e,a)}function Be(t,n,e){let a;return n&&n instanceof Object&&!e?e=n:a=n,M({name:"matches",constraints:[t,a],validator:{validate:(t,n)=>je(t,n.constraints[0],n.constraints[0]),defaultMessage:b((t,n)=>t+"$property must match $constraint1 regular expression",e)}},e)}const Re="isPhoneNumber";function Ue(t,e){const a=n.getInstance();try{const n=a.parseAndKeepRawInput(t,e);return a.isValidNumber(n)}catch(t){return!1}}function _e(t,n){return M({name:"isPhoneNumber",constraints:[t],validator:{validate:(t,n)=>Ue(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a valid phone number",n)}},n)}const Fe="isMilitaryTime";function He(n){return"string"==typeof n&&t.matches(n,/^([01]\d|2[0-3]):?([0-5]\d)$/)}function ke(t){return M({name:"isMilitaryTime",validator:{validate:(t,n)=>He(t),defaultMessage:b(t=>t+"$property must be a valid representation of military time in the format HH:MM",t)}},t)}const qe="isHash";function We(n,e){return"string"==typeof n&&t.isHash(n,e)}function ze(t,n){return M({name:"isHash",constraints:[t],validator:{validate:(t,n)=>We(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a hash of type $constraint1",n)}},n)}const Je="isISSN";function Ze(n,e){return"string"==typeof n&&t.isISSN(n,e)}function Ge(t,n){return M({name:"isISSN",constraints:[t],validator:{validate:(t,n)=>Ze(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a ISSN",n)}},n)}const Ke="isDateString";function Qe(t){return"string"==typeof t&&/^\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.test(t)}function Ye(t){return M({name:"isDateString",validator:{validate:(t,n)=>Qe(t),defaultMessage:b(t=>t+"$property must be a ISOString",t)}},t)}const Xe="isBooleanString";function ta(n){return"string"==typeof n&&t.isBoolean(n)}function na(t){return M({name:"isBooleanString",validator:{validate:(t,n)=>ta(t),defaultMessage:b(t=>t+"$property must be a boolean string",t)}},t)}const ea="isNumberString";function aa(n,e){return"string"==typeof n&&t.isNumeric(n,e)}function ra(t,n){return M({name:"isNumberString",constraints:[t],validator:{validate:(t,n)=>aa(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a number string",n)}},n)}const ia="isBase32";function sa(n){return"string"==typeof n&&t.isBase32(n)}function oa(t){return M({name:"isBase32",validator:{validate:(t,n)=>sa(t),defaultMessage:b(t=>t+"$property must be base32 encoded",t)}},t)}const ca="isBIC";function ua(n){return"string"==typeof n&&t.isBIC(n)}function la(t){return M({name:"isBIC",validator:{validate:(t,n)=>ua(t),defaultMessage:b(t=>t+"$property must be a BIC or SWIFT code",t)}},t)}const da="isBtcAddress";function pa(n){return"string"==typeof n&&t.isBtcAddress(n)}function fa(t){return M({name:"isBtcAddress",validator:{validate:(t,n)=>pa(t),defaultMessage:b(t=>t+"$property must be a BTC address",t)}},t)}const ma="isDataURI";function ga(n){return"string"==typeof n&&t.isDataURI(n)}function ya(t){return M({name:"isDataURI",validator:{validate:(t,n)=>ga(t),defaultMessage:b(t=>t+"$property must be a data uri format",t)}},t)}const va="isEAN";function ha(n){return"string"==typeof n&&t.isEAN(n)}function ba(t){return M({name:"isEAN",validator:{validate:(t,n)=>ha(t),defaultMessage:b(t=>t+"$property must be an EAN (European Article Number)",t)}},t)}const Ma="isEthereumAddress";function $a(n){return"string"==typeof n&&t.isEthereumAddress(n)}function Ia(t){return M({name:"isEthereumAddress",validator:{validate:(t,n)=>$a(t),defaultMessage:b(t=>t+"$property must be an Ethereum address",t)}},t)}const Oa="isHSL";function Na(n){return"string"==typeof n&&t.isHSL(n)}function Aa(t){return M({name:"isHSL",validator:{validate:(t,n)=>Na(t),defaultMessage:b(t=>t+"$property must be a HSL color",t)}},t)}const Sa="isIBAN";function Ea(n){return"string"==typeof n&&t.isIBAN(n)}function Va(t){return M({name:"isIBAN",validator:{validate:(t,n)=>Ea(t),defaultMessage:b(t=>t+"$property must be an IBAN",t)}},t)}const Ca="isIdentityCard";function wa(n,e){return"string"==typeof n&&t.isIdentityCard(n,e)}function Ta(t,n){return M({name:"isIdentityCard",constraints:[t],validator:{validate:(t,n)=>wa(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a identity card number",n)}},n)}const xa="isISRC";function Da(n){return"string"==typeof n&&t.isISRC(n)}function La(t){return M({name:"isISRC",validator:{validate:(t,n)=>Da(t),defaultMessage:b(t=>t+"$property must be an ISRC",t)}},t)}const Pa="isLocale";function ja(n){return"string"==typeof n&&t.isLocale(n)}function Ba(t){return M({name:"isLocale",validator:{validate:(t,n)=>ja(t),defaultMessage:b(t=>t+"$property must be locale",t)}},t)}const Ra="isMagnetURI";function Ua(n){return"string"==typeof n&&t.isMagnetURI(n)}function _a(t){return M({name:"isMagnetURI",validator:{validate:(t,n)=>Ua(t),defaultMessage:b(t=>t+"$property must be magnet uri format",t)}},t)}const Fa="isMimeType";function Ha(n){return"string"==typeof n&&t.isMimeType(n)}function ka(t){return M({name:"isMimeType",validator:{validate:(t,n)=>Ha(t),defaultMessage:b(t=>t+"$property must be MIME type format",t)}},t)}const qa="isOctal";function Wa(n){return"string"==typeof n&&t.isOctal(n)}function za(t){return M({name:"isOctal",validator:{validate:(t,n)=>Wa(t),defaultMessage:b(t=>t+"$property must be valid octal number",t)}},t)}const Ja="isPassportNumber";function Za(n,e){return"string"==typeof n&&t.isPassportNumber(n,e)}function Ga(t,n){return M({name:"isPassportNumber",constraints:[t],validator:{validate:(t,n)=>Za(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be valid passport number",n)}},n)}const Ka="isPostalCode";function Qa(n,e){return"string"==typeof n&&t.isPostalCode(n,e)}function Ya(t,n){return M({name:"isPostalCode",constraints:[t],validator:{validate:(t,n)=>Qa(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a postal code",n)}},n)}const Xa="isRFC3339";function tr(n){return"string"==typeof n&&t.isRFC3339(n)}function nr(t){return M({name:"isRFC3339",validator:{validate:(t,n)=>tr(t),defaultMessage:b(t=>t+"$property must be RFC 3339 date",t)}},t)}const er="isRgbColor";function ar(n,e){return"string"==typeof n&&t.isRgbColor(n,e)}function rr(t,n){return M({name:"isRgbColor",constraints:[t],validator:{validate:(t,n)=>ar(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be RGB color",n)}},n)}const ir="isSemVer";function sr(n){return"string"==typeof n&&t.isSemVer(n)}function or(t){return M({name:"isSemVer",validator:{validate:(t,n)=>sr(t),defaultMessage:b(t=>t+"$property must be a Semantic Versioning Specification",t)}},t)}const cr="isBoolean";function ur(t){return t instanceof Boolean||"boolean"==typeof t}function lr(t){return M({name:"isBoolean",validator:{validate:(t,n)=>ur(t),defaultMessage:b(t=>t+"$property must be a boolean value",t)}},t)}const dr="isDate";function pr(t){return t instanceof Date&&!isNaN(t.getTime())}function fr(t){return M({name:"isDate",validator:{validate:(t,n)=>pr(t),defaultMessage:b(t=>t+"$property must be a Date instance",t)}},t)}const mr="isNumber";function gr(t,n={}){if("number"!=typeof t)return!1;if(t===1/0||t===-1/0)return n.allowInfinity;if(Number.isNaN(t))return n.allowNaN;if(void 0!==n.maxDecimalPlaces){let e=0;if(t%1!=0&&(e=t.toString().split(".")[1].length),e>n.maxDecimalPlaces)return!1}return Number.isFinite(t)}function yr(t={},n){return M({name:"isNumber",constraints:[t],validator:{validate:(t,n)=>gr(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a number conforming to the specified constraints",n)}},n)}const vr="isEnum";function hr(t,n){return Object.keys(n).map(t=>n[t]).indexOf(t)>=0}function br(t,n){return M({name:"isEnum",constraints:[t],validator:{validate:(t,n)=>hr(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must be a valid enum value",n)}},n)}const Mr="isInt";function $r(t){return"number"==typeof t&&Number.isInteger(t)}function Ir(t){return M({name:"isInt",validator:{validate:(t,n)=>$r(t),defaultMessage:b(t=>t+"$property must be an integer number",t)}},t)}const Or="isString";function Nr(t){return t instanceof String||"string"==typeof t}function Ar(t){return M({name:"isString",validator:{validate:(t,n)=>Nr(t),defaultMessage:b(t=>t+"$property must be a string",t)}},t)}const Sr="isArray";function Er(t){return t instanceof Array}function Vr(t){return M({name:"isArray",validator:{validate:(t,n)=>Er(t),defaultMessage:b(t=>t+"$property must be an array",t)}},t)}const Cr="isObject";function wr(t){return null!=t&&("object"==typeof t||"function"==typeof t)&&!Array.isArray(t)}function Tr(t){return M({name:"isObject",validator:{validate:(t,n)=>wr(t),defaultMessage:b(t=>t+"$property must be an object",t)}},t)}const xr="arrayContains";function Dr(t,n){return t instanceof Array&&n.every(n=>-1!==t.indexOf(n))}function Lr(t,n){return M({name:"arrayContains",constraints:[t],validator:{validate:(t,n)=>Dr(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must contain $constraint1 values",n)}},n)}const Pr="arrayNotContains";function jr(t,n){return t instanceof Array&&n.every(n=>-1===t.indexOf(n))}function Br(t,n){return M({name:"arrayNotContains",constraints:[t],validator:{validate:(t,n)=>jr(t,n.constraints[0]),defaultMessage:b(t=>t+"$property should not contain $constraint1 values",n)}},n)}const Rr="arrayNotEmpty";function Ur(t){return t instanceof Array&&t.length>0}function _r(t){return M({name:"arrayNotEmpty",validator:{validate:(t,n)=>Ur(t),defaultMessage:b(t=>t+"$property should not be empty",t)}},t)}const Fr="arrayMinSize";function Hr(t,n){return t instanceof Array&&t.length>=n}function kr(t,n){return M({name:"arrayMinSize",constraints:[t],validator:{validate:(t,n)=>Hr(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must contain at least $constraint1 elements",n)}},n)}const qr="arrayMaxSize";function Wr(t,n){return t instanceof Array&&t.length<=n}function zr(t,n){return M({name:"arrayMaxSize",constraints:[t],validator:{validate:(t,n)=>Wr(t,n.constraints[0]),defaultMessage:b(t=>t+"$property must contain not more than $constraint1 elements",n)}},n)}const Jr="arrayUnique";function Zr(t){if(!(t instanceof Array))return!1;const n=t.filter((t,n,e)=>e.indexOf(t)===n);return t.length===n.length}function Gr(t){return M({name:"arrayUnique",validator:{validate:(t,n)=>Zr(t),defaultMessage:b(t=>t+"All $property's elements must be unique",t)}},t)}const Kr="isNotEmptyObject";function Qr(t){if(!wr(t))return!1;for(const n in t)if(t.hasOwnProperty(n))return!0;return!1}function Yr(t){return M({name:"isNotEmptyObject",validator:{validate:(t,n)=>Qr(t),defaultMessage:b(t=>t+"$property must be a non-empty object",t)}},t)}const Xr="isInstance";function ti(t,n){return n&&"function"==typeof n&&t instanceof n}function ni(t,n){return M({name:"isInstance",constraints:[t],validator:{validate:(t,n)=>ti(t,n.constraints[0]),defaultMessage:b((t,n)=>n.constraints[0]?t+`$property must be an instance of ${n.constraints[0].name}`:t+"isInstance decorator expects and object as value, but got falsy value.",n)}},n)}function ei(t,n,e){return"string"==typeof t?g(l).validate(t,n,e):g(l).validate(t,n)}function ai(t,n,e){return"string"==typeof t?g(l).validateOrReject(t,n,e):g(l).validateOrReject(t,n)}function ri(t,n,e){return"string"==typeof t?g(l).validateSync(t,n,e):g(l).validateSync(t,n)}function ii(t){r().addValidationSchema(t)}export{xr as ARRAY_CONTAINS,qr as ARRAY_MAX_SIZE,Fr as ARRAY_MIN_SIZE,Pr as ARRAY_NOT_CONTAINS,Rr as ARRAY_NOT_EMPTY,Jr as ARRAY_UNIQUE,y as Allow,Lr as ArrayContains,zr as ArrayMaxSize,kr as ArrayMinSize,Br as ArrayNotContains,_r as ArrayNotEmpty,Gr as ArrayUnique,Nt as CONTAINS,St as Contains,U as EQUALS,F as Equals,wt as IS_ALPHA,Dt as IS_ALPHANUMERIC,Sr as IS_ARRAY,Ut as IS_ASCII,ia as IS_BASE32,Ht as IS_BASE64,ca as IS_BIC,cr as IS_BOOLEAN,Xe as IS_BOOLEAN_STRING,da as IS_BTC_ADDRESS,Wt as IS_BYTE_LENGTH,Zt as IS_CREDIT_CARD,Qt as IS_CURRENCY,ma as IS_DATA_URI,dr as IS_DATE,Ke as IS_DATE_STRING,jt as IS_DECIMAL,$ as IS_DEFINED,at as IS_DIVISIBLE_BY,va as IS_EAN,tn as IS_EMAIL,W as IS_EMPTY,vr as IS_ENUM,Ma as IS_ETHEREUM_ADDRESS,Me as IS_FIREBASE_PUSH_ID,an as IS_FQDN,on as IS_FULL_WIDTH,ln as IS_HALF_WIDTH,qe as IS_HASH,bn as IS_HEXADECIMAL,yn as IS_HEX_COLOR,Oa as IS_HSL,Sa as IS_IBAN,Ca as IS_IDENTITY_CARD,Q as IS_IN,Xr as IS_INSTANCE,Mr as IS_INT,Sn as IS_IP,xn as IS_ISBN,Pn as IS_ISIN,Xn as IS_ISO31661_ALPHA_2,ee as IS_ISO31661_ALPHA_3,Rn as IS_ISO8601,xa as IS_ISRC,Je as IS_ISSN,Fn as IS_JSON,qn as IS_JWT,D as IS_LATITUDE,w as IS_LATLONG,Pa as IS_LOCALE,j as IS_LONGITUDE,Jn as IS_LOWERCASE,On as IS_MAC_ADDRESS,Ra as IS_MAGNET_URI,Fe as IS_MILITARY_TIME,Fa as IS_MIME_TYPE,Kn as IS_MOBILE_PHONE,ie as IS_MONGO_ID,ce as IS_MULTIBYTE,ut as IS_NEGATIVE,Z as IS_NOT_EMPTY,Kr as IS_NOT_EMPTY_OBJECT,tt as IS_NOT_IN,mr as IS_NUMBER,ea as IS_NUMBER_STRING,Cr as IS_OBJECT,qa as IS_OCTAL,Ja as IS_PASSPORT_NUMBER,Re as IS_PHONE_NUMBER,Cn as IS_PORT,st as IS_POSITIVE,Ka as IS_POSTAL_CODE,Xa as IS_RFC_3339,er as IS_RGB_COLOR,ir as IS_SEM_VER,Or as IS_STRING,de as IS_SURROGATE_PAIR,Oe as IS_UPPERCASE,me as IS_URL,ve as IS_UUID,fn as IS_VARIABLE_WIDTH,xt as IsAlpha,Pt as IsAlphanumeric,Vr as IsArray,Ft as IsAscii,la as IsBIC,oa as IsBase32,qt as IsBase64,lr as IsBoolean,na as IsBooleanString,fa as IsBtcAddress,Jt as IsByteLength,Kt as IsCreditCard,Xt as IsCurrency,ya as IsDataURI,fr as IsDate,Ye as IsDateString,Rt as IsDecimal,O as IsDefined,it as IsDivisibleBy,ba as IsEAN,en as IsEmail,J as IsEmpty,br as IsEnum,Ia as IsEthereumAddress,sn as IsFQDN,Ie as IsFirebasePushId,un as IsFullWidth,Aa as IsHSL,pn as IsHalfWidth,ze as IsHash,hn as IsHexColor,$n as IsHexadecimal,Va as IsIBAN,Vn as IsIP,Ln as IsISBN,Bn as IsISIN,ne as IsISO31661Alpha2,re as IsISO31661Alpha3,_n as IsISO8601,La as IsISRC,Ge as IsISSN,Ta as IsIdentityCard,X as IsIn,ni as IsInstance,Ir as IsInt,kn as IsJSON,zn as IsJWT,x as IsLatLong,P as IsLatitude,Ba as IsLocale,R as IsLongitude,Gn as IsLowercase,An as IsMACAddress,_a as IsMagnetURI,ke as IsMilitaryTime,ka as IsMimeType,Yn as IsMobilePhone,oe as IsMongoId,le as IsMultibyte,dt as IsNegative,K as IsNotEmpty,Yr as IsNotEmptyObject,et as IsNotIn,yr as IsNumber,ra as IsNumberString,Tr as IsObject,za as IsOctal,N as IsOptional,Ga as IsPassportNumber,_e as IsPhoneNumber,Tn as IsPort,ct as IsPositive,Ya as IsPostalCode,nr as IsRFC3339,rr as IsRgbColor,or as IsSemVer,Ar as IsString,fe as IsSurrogatePair,be as IsUUID,Ae as IsUppercase,ye as IsUrl,gn as IsVariableWidth,Se as LENGTH,Ve as Length,Pe as MATCHES,pt as MAX,$t as MAX_DATE,Ce as MAX_LENGTH,gt as MIN,ht as MIN_DATE,xe as MIN_LENGTH,Be as Matches,mt as Max,Ot as MaxDate,Te as MaxLength,i as MetadataStorage,vt as Min,Mt as MinDate,Le as MinLength,Et as NOT_CONTAINS,H as NOT_EQUALS,Ct as NotContains,q as NotEquals,S as Validate,M as ValidateBy,E as ValidateIf,V as ValidateNested,C as ValidatePromise,s as ValidationError,o as ValidationTypes,l as Validator,A as ValidatorConstraint,Dr as arrayContains,Wr as arrayMaxSize,Hr as arrayMinSize,jr as arrayNotContains,Ur as arrayNotEmpty,Zr as arrayUnique,b as buildMessage,At as contains,_ as equals,g as getFromContainer,r as getMetadataStorage,Tt as isAlpha,Lt as isAlphanumeric,Er as isArray,_t as isAscii,ua as isBIC,sa as isBase32,kt as isBase64,ur as isBoolean,ta as isBooleanString,pa as isBtcAddress,zt as isByteLength,Gt as isCreditCard,Yt as isCurrency,ga as isDataURI,pr as isDate,Qe as isDateString,Bt as isDecimal,I as isDefined,rt as isDivisibleBy,ha as isEAN,nn as isEmail,z as isEmpty,hr as isEnum,$a as isEthereumAddress,rn as isFQDN,$e as isFirebasePushId,cn as isFullWidth,Na as isHSL,dn as isHalfWidth,We as isHash,vn as isHexColor,Mn as isHexadecimal,Ea as isIBAN,En as isIP,Dn as isISBN,jn as isISIN,te as isISO31661Alpha2,ae as isISO31661Alpha3,Un as isISO8601,Da as isISRC,Ze as isISSN,wa as isIdentityCard,Y as isIn,ti as isInstance,$r as isInt,Hn as isJSON,Wn as isJWT,T as isLatLong,L as isLatitude,ja as isLocale,B as isLongitude,Zn as isLowercase,Nn as isMACAddress,Ua as isMagnetURI,He as isMilitaryTime,Ha as isMimeType,Qn as isMobilePhone,se as isMongoId,ue as isMultibyte,lt as isNegative,G as isNotEmpty,Qr as isNotEmptyObject,nt as isNotIn,gr as isNumber,aa as isNumberString,wr as isObject,Wa as isOctal,Za as isPassportNumber,Ue as isPhoneNumber,wn as isPort,ot as isPositive,Qa as isPostalCode,tr as isRFC3339,ar as isRgbColor,sr as isSemVer,Nr as isString,pe as isSurrogatePair,ge as isURL,he as isUUID,Ne as isUppercase,In as isValidationOptions,mn as isVariableWidth,Ee as length,je as matches,ft as max,It as maxDate,we as maxLength,yt as min,bt as minDate,De as minLength,Vt as notContains,k as notEquals,h as registerDecorator,ii as registerSchema,m as useContainer,ei as validate,ai as validateOrReject,ri as validateSync}; +//# sourceMappingURL=index.esm.min.js.map diff --git a/src/node_modules/class-validator/bundles/index.esm.min.js.map b/src/node_modules/class-validator/bundles/index.esm.min.js.map new file mode 100644 index 0000000..3d5d710 --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.esm.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.esm.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/utils.ts","../../src/validation/ValidationExecutor.ts","../../src/validation/ValidationUtils.ts","../../src/validation/Validator.ts","../../src/container.ts","../../src/decorator/common/Allow.ts","../../src/metadata/ConstraintMetadata.ts","../../src/register-decorator.ts","../../src/decorator/common/ValidateBy.ts","../../src/decorator/common/IsDefined.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/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/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","// 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 {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}","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 { 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 {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 { 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 { 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 {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":["ValidationMetadata","[object Object]","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","getMetadataStorage","window","global","classValidatorMetadataStorage","MetadataStorage","hasValidationMetaData","validationMetadatas","length","transform","validationMetadata","addValidationMetadata","metadata","constraintMetadatas","grouped","targetConstructor","targetSchema","originalMetadatas","filter","find","group","indexOf","uniqueInheritedMetadatas","Function","prototype","inheritedMetadata","originalMetadata","concat","ValidationError","shouldDecorate","hasParent","parentPath","boldStart","boldEnd","propConstraintFailed","join","formattedProperty","Number","isInteger","children","map","childError","toString","constructor","ValidationTypes","key","isPromise","p","then","ValidationExecutor","validator","validatorOptions","object","validationErrors","metadataStorage","console","warn","targetMetadatas","getTargetValidationMetadatas","groupedMetadatas","groupByPropertyName","forbidUnknownValues","validationError","value","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","validationArguments","targetName","Array","Set","Map","validatedValue","instance","validate","promise","isValid","createValidationError","contexts","assign","val","validatedSubValues","from","values","isArray","subValue","some","validatedSubValue","asyncValidatedSubValues","resolve","asyncValidationIsFinishedPromise","all","flatValidatedValues","every","index","execute","customConstraint","getConstraintType","customValidatorMetadata","dismissDefaultMessages","defaultMessage","messageString","constraint","replace","RegExp","replaceMessageSpecialTokens","Validator","objectOrSchemaName","objectOrValidationOptions","maybeValidatorOptions","executor","coreValidate","reject","defaultContainer","someClass","instances","userContainer","userContainerOptions","useContainer","iocContainer","getFromContainer","get","fallback","fallbackOnErrors","Allow","ConstraintMetadata","registerDecorator","addConstraintMetadata","validationMetadataArgs","buildMessage","impl","eachPrefix","ValidateBy","isDefined","IsDefined","IsOptional","ValidatorConstraint","isAsync","x","y","toLowerCase","Validate","constraintClass","constraintsOrValidationOptions","maybeValidationOptions","ValidateIf","condition","ValidateNested","opts","ValidatePromise","IS_LATLONG","isLatLong","IsLatLong","IS_LATITUDE","isLatitude","IsLatitude","IS_LONGITUDE","isLongitude","IsLongitude","EQUALS","equals","comparison","Equals","NOT_EQUALS","notEquals","NotEquals","IS_EMPTY","isEmpty","IsEmpty","IS_NOT_EMPTY","isNotEmpty","IsNotEmpty","IS_IN","isIn","possibleValues","possibleValue","IsIn","IS_NOT_IN","isNotIn","IsNotIn","IS_DIVISIBLE_BY","isDivisibleBy","num","String","IsDivisibleBy","IS_POSITIVE","isPositive","IsPositive","IS_NEGATIVE","isNegative","IsNegative","MAX","max","Max","maxValue","MIN","min","Min","minValue","MIN_DATE","minDate","date","Date","getTime","MinDate","MAX_DATE","maxDate","MaxDate","CONTAINS","contains","seed","Contains","NOT_CONTAINS","notContains","NotContains","IS_ALPHA","isAlpha","locale","ValidatorJS","IsAlpha","IS_ALPHANUMERIC","isAlphanumeric","IsAlphanumeric","IS_DECIMAL","isDecimal","IsDecimal","IS_ASCII","isAscii","IsAscii","IS_BASE64","isBase64","IsBase64","IS_BYTE_LENGTH","isByteLength","IsByteLength","IS_CREDIT_CARD","isCreditCard","IsCreditCard","IS_CURRENCY","isCurrency","IsCurrency","IS_EMAIL","isEmail","IsEmail","IS_FQDN","isFQDN","IsFQDN","IS_FULL_WIDTH","isFullWidth","IsFullWidth","IS_HALF_WIDTH","isHalfWidth","IsHalfWidth","IS_VARIABLE_WIDTH","isVariableWidth","IsVariableWidth","IS_HEX_COLOR","isHexColor","IsHexColor","IS_HEXADECIMAL","isHexadecimal","IsHexadecimal","isValidationOptions","IS_MAC_ADDRESS","isMACAddress","IsMACAddress","optionsOrValidationOptionsArg","validationOptionsArg","IS_IP","isIP","version","versionStr","IsIP","IS_PORT","isPort","IsPort","IS_ISBN","isISBN","IsISBN","IS_ISIN","isISIN","IsISIN","IS_ISO8601","isISO8601","IsISO8601","IS_JSON","isJSON","IsJSON","IS_JWT","isJWT","IsJWT","IS_LOWERCASE","isLowercase","IsLowercase","IS_MOBILE_PHONE","isMobilePhone","IsMobilePhone","IS_ISO31661_ALPHA_2","isISO31661Alpha2","IsISO31661Alpha2","IS_ISO31661_ALPHA_3","isISO31661Alpha3","IsISO31661Alpha3","IS_MONGO_ID","isMongoId","IsMongoId","IS_MULTIBYTE","isMultibyte","IsMultibyte","IS_SURROGATE_PAIR","isSurrogatePair","IsSurrogatePair","IS_URL","isURL","IsUrl","IS_UUID","isUUID","IsUUID","IS_FIREBASE_PUSH_ID","isFirebasePushId","test","IsFirebasePushId","IS_UPPERCASE","isUppercase","IsUppercase","LENGTH","isLength","Length","isMinLength","isMaxLength","MAX_LENGTH","maxLength","MaxLength","MIN_LENGTH","minLength","MinLength","MATCHES","matches","pattern","modifiers","Matches","modifiersOrAnnotationOptions","IS_PHONE_NUMBER","isPhoneNumber","region","phoneUtil","PhoneNumberUtil","getInstance","phoneNum","parseAndKeepRawInput","isValidNumber","IsPhoneNumber","IS_MILITARY_TIME","isMilitaryTime","IsMilitaryTime","IS_HASH","isHash","algorithm","IsHash","IS_ISSN","isISSN","IsISSN","IS_DATE_STRING","isDateString","IsDateString","IS_BOOLEAN_STRING","isBooleanString","isBoolean","IsBooleanString","IS_NUMBER_STRING","isNumberString","isNumeric","IsNumberString","IS_BASE32","isBase32","IsBase32","IS_BIC","isBIC","IsBIC","IS_BTC_ADDRESS","isBtcAddress","IsBtcAddress","IS_DATA_URI","isDataURI","IsDataURI","IS_EAN","isEAN","IsEAN","IS_ETHEREUM_ADDRESS","isEthereumAddress","IsEthereumAddress","IS_HSL","isHSL","IsHSL","IS_IBAN","isIBAN","IsIBAN","IS_IDENTITY_CARD","isIdentityCard","IsIdentityCard","IS_ISRC","isISRC","IsISRC","IS_LOCALE","isLocale","IsLocale","IS_MAGNET_URI","isMagnetURI","IsMagnetURI","IS_MIME_TYPE","isMimeType","IsMimeType","IS_OCTAL","isOctal","IsOctal","IS_PASSPORT_NUMBER","isPassportNumber","countryCode","IsPassportNumber","IS_POSTAL_CODE","isPostalCode","IsPostalCode","IS_RFC_3339","isRFC3339","IsRFC3339","IS_RGB_COLOR","isRgbColor","includePercentValues","IsRgbColor","IS_SEM_VER","isSemVer","IsSemVer","IS_BOOLEAN","Boolean","IsBoolean","IS_DATE","isDate","isNaN","IsDate","IS_NUMBER","isNumber","Infinity","allowInfinity","allowNaN","maxDecimalPlaces","decimalPlaces","split","isFinite","IsNumber","IS_ENUM","isEnum","entity","k","IsEnum","IS_INT","isInt","IsInt","IS_STRING","isString","IsString","IS_ARRAY","IsArray","IS_OBJECT","isObject","IsObject","ARRAY_CONTAINS","arrayContains","array","ArrayContains","ARRAY_NOT_CONTAINS","arrayNotContains","ArrayNotContains","ARRAY_NOT_EMPTY","arrayNotEmpty","ArrayNotEmpty","ARRAY_MIN_SIZE","arrayMinSize","ArrayMinSize","ARRAY_MAX_SIZE","arrayMaxSize","ArrayMaxSize","ARRAY_UNIQUE","arrayUnique","uniqueItems","a","b","c","ArrayUnique","IS_NOT_EMPTY_OBJECT","isNotEmptyObject","hasOwnProperty","IsNotEmptyObject","IS_INSTANCE","isInstance","targetTypeConstructor","IsInstance","targetType","schemaNameOrObject","validateOrReject","validateSync","registerSchema","addValidationSchema"],"mappings":"uFAMaA,EAiETC,YAAYC,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,UC1ElD,MAAaC,EAEThB,UAAUiB,GACN,MAAMC,EAAkC,GAoBxC,OAnBAC,OAAOC,KAAKH,EAAOI,YAAYC,QAAQC,IACnCN,EAAOI,WAAWE,GAAUD,QAAQE,IAChC,MAAMd,EAAuC,CACzCC,QAASa,EAAWb,QACpBC,OAAQY,EAAWZ,OACnBC,OAAQW,EAAWX,OACnBC,KAAMU,EAAWV,MAEfb,EAA+B,CACjCG,KAAMoB,EAAWpB,KACjBC,O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,EAAa,uCAC7BrL,KAIZA,SCpCK8hB,GAAc,sBAKXC,GAAW1d,EAAiB2d,GACxC,OAAOA,GACiC,mBAA1BA,GACP3d,aAAkB2d,WAMbC,GAAWC,EAAyCliB,GAChE,OAAOsL,EACH,CACIvK,KAjBe,aAkBflB,YAAa,CAACqiB,GACd/d,UAAW,CACPyD,SAAU,CAAC5C,EAAOzF,IAASwiB,GAAW/c,EAAOzF,EAAKM,YAAY,IAC9DyJ,eAAgB6B,EACZ,CAACE,EAAY9L,IACLA,EAAKM,YAAY,GACVwL,EAAa,oCAAoC9L,EAAKM,YAAY,GAAGkB,OAErEsK,EAAa,yEAG5BrL,KAIZA,GCKR,SAAgB4H,GAASua,EACArY,EACAC,GACrB,MAAkC,iBAAvBoY,EACAzX,EAAiBd,GAAWhC,SAASua,EAA8BrY,EAAqCC,GAExGW,EAAiBd,GAAWhC,SAASua,EAA8BrY,GAiBlF,SAAgBsY,GAAiBD,EACRrY,EACAC,GACrB,MAAkC,iBAAvBoY,EACAzX,EAAiBd,GAAWwY,iBAAiBD,EAA8BrY,EAAqCC,GAEhHW,EAAiBd,GAAWwY,iBAAiBD,EAA8BrY,GAuB1F,SAAgBuY,GAAaF,EACArY,EACAC,GACzB,MAAkC,iBAAvBoY,EACAzX,EAAiBd,GAAWyY,aAAaF,EAA8BrY,EAAqCC,GAE5GW,EAAiBd,GAAWyY,aAAaF,EAA8BrY,YAOtEwY,GAAe/hB,GAC3BW,IAAqBqhB,oBAAoBhiB"} \ No newline at end of file diff --git a/src/node_modules/class-validator/bundles/index.umd.js b/src/node_modules/class-validator/bundles/index.umd.js new file mode 100644 index 0000000..40e91a9 --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.umd.js @@ -0,0 +1,3582 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('tslib'), require('validator'), require('google-libphonenumber')) : + typeof define === 'function' && define.amd ? define(['exports', 'tslib', 'validator', 'google-libphonenumber'], factory) : + (global = global || self, factory(global.ClassValidator = {}, global.tslib_1, global.validator, global.googleLibphonenumber)); +}(this, (function (exports, tslib_1, validator, googleLibphonenumber) { 'use strict'; + + validator = validator && Object.prototype.hasOwnProperty.call(validator, 'default') ? validator['default'] : validator; + + /** + * This metadata contains validation rules. + */ + var ValidationMetadata = /** @class */ (function () { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + function ValidationMetadata(args) { + /** + * Validation groups used for this validation. + */ + this.groups = []; + /** + * Indicates if validation must be performed always, no matter of validation groups used. + */ + this.always = false; + /** + * Specifies if validated value is an array and each of its item must be validated. + */ + this.each = false; + /* + * A transient set of data passed through to the validation result for response mapping + */ + this.context = undefined; + this.type = args.type; + this.target = args.target; + this.propertyName = args.propertyName; + this.constraints = args.constraints; + this.constraintCls = args.constraintCls; + this.validationTypeOptions = args.validationTypeOptions; + if (args.validationOptions) { + this.message = args.validationOptions.message; + this.groups = args.validationOptions.groups; + this.always = args.validationOptions.always; + this.each = args.validationOptions.each; + this.context = args.validationOptions.context; + } + } + return ValidationMetadata; + }()); + + /** + * Used to transform validation schemas to validation metadatas. + */ + var ValidationSchemaToMetadataTransformer = /** @class */ (function () { + function ValidationSchemaToMetadataTransformer() { + } + ValidationSchemaToMetadataTransformer.prototype.transform = function (schema) { + var metadatas = []; + Object.keys(schema.properties).forEach(function (property) { + schema.properties[property].forEach(function (validation) { + var validationOptions = { + message: validation.message, + groups: validation.groups, + always: validation.always, + each: validation.each + }; + var args = { + type: validation.type, + target: schema.name, + propertyName: property, + constraints: validation.constraints, + validationTypeOptions: validation.options, + validationOptions: validationOptions + }; + metadatas.push(new ValidationMetadata(args)); + }); + }); + return metadatas; + }; + return ValidationSchemaToMetadataTransformer; + }()); + + /** + * Gets metadata storage. + * Metadata storage follows the best practices and stores metadata in a global variable. + */ + function getMetadataStorage() { + if (typeof window !== "undefined") { + window.global = window; + } + if (!global.classValidatorMetadataStorage) + global.classValidatorMetadataStorage = new MetadataStorage(); + return global.classValidatorMetadataStorage; + } + /** + * Storage all metadatas. + */ + var MetadataStorage = /** @class */ (function () { + function MetadataStorage() { + // ------------------------------------------------------------------------- + // Private properties + // ------------------------------------------------------------------------- + this.validationMetadatas = []; + this.constraintMetadatas = []; + } + Object.defineProperty(MetadataStorage.prototype, "hasValidationMetaData", { + get: function () { + return !!this.validationMetadatas.length; + }, + enumerable: true, + configurable: true + }); + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + /** + * Adds a new validation metadata. + */ + MetadataStorage.prototype.addValidationSchema = function (schema) { + var _this = this; + var validationMetadatas = new ValidationSchemaToMetadataTransformer().transform(schema); + validationMetadatas.forEach(function (validationMetadata) { return _this.addValidationMetadata(validationMetadata); }); + }; + /** + * Adds a new validation metadata. + */ + MetadataStorage.prototype.addValidationMetadata = function (metadata) { + this.validationMetadatas.push(metadata); + }; + /** + * Adds a new constraint metadata. + */ + MetadataStorage.prototype.addConstraintMetadata = function (metadata) { + this.constraintMetadatas.push(metadata); + }; + /** + * Groups metadata by their property names. + */ + MetadataStorage.prototype.groupByPropertyName = function (metadata) { + var grouped = {}; + metadata.forEach(function (metadata) { + if (!grouped[metadata.propertyName]) + grouped[metadata.propertyName] = []; + grouped[metadata.propertyName].push(metadata); + }); + return grouped; + }; + /** + * Gets all validation metadatas for the given object with the given groups. + */ + MetadataStorage.prototype.getTargetValidationMetadatas = function (targetConstructor, targetSchema, groups) { + // get directly related to a target metadatas + var originalMetadatas = this.validationMetadatas.filter(function (metadata) { + if (metadata.target !== targetConstructor && metadata.target !== targetSchema) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(function (group) { return groups.indexOf(group) !== -1; }); + return true; + }); + // get metadatas for inherited classes + var inheritedMetadatas = this.validationMetadatas.filter(function (metadata) { + // if target is a string it's means we validate agains a schema, and there is no inheritance support for schemas + if (typeof metadata.target === "string") + return false; + if (metadata.target === targetConstructor) + return false; + if (metadata.target instanceof Function && + !(targetConstructor.prototype instanceof metadata.target)) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(function (group) { return groups.indexOf(group) !== -1; }); + return true; + }); + // filter out duplicate metadatas, prefer original metadatas instead of inherited metadatas + var uniqueInheritedMetadatas = inheritedMetadatas.filter(function (inheritedMetadata) { + return !originalMetadatas.find(function (originalMetadata) { + return originalMetadata.propertyName === inheritedMetadata.propertyName && + originalMetadata.type === inheritedMetadata.type; + }); + }); + return originalMetadatas.concat(uniqueInheritedMetadatas); + }; + /** + * Gets all validator constraints for the given object. + */ + MetadataStorage.prototype.getTargetValidatorConstraints = function (target) { + return this.constraintMetadatas.filter(function (metadata) { return metadata.target === target; }); + }; + return MetadataStorage; + }()); + + /** + * Validation error description. + */ + var ValidationError = /** @class */ (function () { + function ValidationError() { + } + /** + * + * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability + * @param hasParent true when the error is a child of an another one + * @param parentPath path as string to the parent of this property + */ + ValidationError.prototype.toString = function (shouldDecorate, hasParent, parentPath) { + var _this = this; + if (shouldDecorate === void 0) { shouldDecorate = false; } + if (hasParent === void 0) { hasParent = false; } + if (parentPath === void 0) { parentPath = ""; } + var boldStart = shouldDecorate ? "\u001B[1m" : ""; + var boldEnd = shouldDecorate ? "\u001B[22m" : ""; + var propConstraintFailed = function (propertyName) { return " - property " + boldStart + parentPath + propertyName + boldEnd + " has failed the following constraints: " + boldStart + Object.keys(_this.constraints).join(", ") + boldEnd + " \n"; }; + if (!hasParent) { + return "An instance of " + boldStart + (this.target ? this.target.constructor.name : "an object") + boldEnd + " has failed the validation:\n" + + (this.constraints ? propConstraintFailed(this.property) : "") + + this.children + .map(function (childError) { return childError.toString(shouldDecorate, true, _this.property); }) + .join(""); + } + else { + // we format numbers as array indexes for better readability. + var formattedProperty_1 = Number.isInteger(+this.property) ? "[" + this.property + "]" : "" + (parentPath ? "." : "") + this.property; + if (this.constraints) { + return propConstraintFailed(formattedProperty_1); + } + else { + return this.children + .map(function (childError) { return childError.toString(shouldDecorate, true, "" + parentPath + formattedProperty_1); }) + .join(""); + } + } + }; + return ValidationError; + }()); + + /** + * Validation types. + */ + var ValidationTypes = /** @class */ (function () { + function ValidationTypes() { + } + /** + * Checks if validation type is valid. + */ + ValidationTypes.isValid = function (type) { + var _this = this; + return type !== "isValid" && + type !== "getMessage" && + Object.keys(this).map(function (key) { return _this[key]; }).indexOf(type) !== -1; + }; + /* system */ + ValidationTypes.CUSTOM_VALIDATION = "customValidation"; // done + ValidationTypes.NESTED_VALIDATION = "nestedValidation"; // done + ValidationTypes.PROMISE_VALIDATION = "promiseValidation"; // done + ValidationTypes.CONDITIONAL_VALIDATION = "conditionalValidation"; // done + ValidationTypes.WHITELIST = "whitelistValidation"; // done + ValidationTypes.IS_DEFINED = "isDefined"; // done + return ValidationTypes; + }()); + + var ValidationUtils = /** @class */ (function () { + function ValidationUtils() { + } + ValidationUtils.replaceMessageSpecialTokens = function (message, validationArguments) { + var messageString; + if (message instanceof Function) { + messageString = message(validationArguments); + } + else if (typeof message === "string") { + messageString = message; + } + if (messageString && validationArguments.constraints instanceof Array) { + validationArguments.constraints.forEach(function (constraint, index) { + messageString = messageString.replace(new RegExp("\\$constraint" + (index + 1), "g"), constraint); + }); + } + if (messageString && validationArguments.value !== undefined && validationArguments.value !== null && typeof validationArguments.value === "string") + messageString = messageString.replace(/\$value/g, validationArguments.value); + if (messageString) + messageString = messageString.replace(/\$property/g, validationArguments.property); + if (messageString) + messageString = messageString.replace(/\$target/g, validationArguments.targetName); + return messageString; + }; + return ValidationUtils; + }()); + + // https://github.com/TylorS/typed-is-promise/blob/abf1514e1b6961adfc75765476b0debb96b2c3ae/src/index.ts + function isPromise(p) { + return p !== null && typeof p === "object" && typeof p.then === "function"; + } + /** + * Convert Map, Set to Array + */ + function convertToArray(val) { + if (val instanceof Map) { + return Array.from(val.values()); + } + return Array.isArray(val) ? val : Array.from(val); + } + + /** + * Executes validation over given object. + */ + var ValidationExecutor = /** @class */ (function () { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + function ValidationExecutor(validator, validatorOptions) { + this.validator = validator; + this.validatorOptions = validatorOptions; + // ------------------------------------------------------------------------- + // Properties + // ------------------------------------------------------------------------- + this.awaitingPromises = []; + this.ignoreAsyncValidations = false; + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + this.metadataStorage = getMetadataStorage(); + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + ValidationExecutor.prototype.execute = function (object, targetSchema, validationErrors) { + var _this = this; + /** + * If there is no metadata registered it means possibly the dependencies are not flatterned and + * more than one instance is used. + * + * TODO: This needs proper handling, forcing to use the same container or some other proper solution. + */ + if (!this.metadataStorage.hasValidationMetaData) { + console.warn("No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies."); + } + var groups = this.validatorOptions ? this.validatorOptions.groups : undefined; + var targetMetadatas = this.metadataStorage.getTargetValidationMetadatas(object.constructor, targetSchema, groups); + var groupedMetadatas = this.metadataStorage.groupByPropertyName(targetMetadatas); + if (this.validatorOptions && this.validatorOptions.forbidUnknownValues && !targetMetadatas.length) { + var validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + validationError.value = undefined; + validationError.property = undefined; + validationError.children = []; + validationError.constraints = { unknownValue: "an unknown value was passed to the validate function" }; + validationErrors.push(validationError); + return; + } + if (this.validatorOptions && this.validatorOptions.whitelist) + this.whitelist(object, groupedMetadatas, validationErrors); + // General validation + Object.keys(groupedMetadatas).forEach(function (propertyName) { + var value = object[propertyName]; + var definedMetadatas = groupedMetadatas[propertyName].filter(function (metadata) { return metadata.type === ValidationTypes.IS_DEFINED; }); + var metadatas = groupedMetadatas[propertyName].filter(function (metadata) { return metadata.type !== ValidationTypes.IS_DEFINED && metadata.type !== ValidationTypes.WHITELIST; }); + if (value instanceof Promise && metadatas.find(function (metadata) { return metadata.type === ValidationTypes.PROMISE_VALIDATION; })) { + _this.awaitingPromises.push(value.then(function (resolvedValue) { + _this.performValidations(object, resolvedValue, propertyName, definedMetadatas, metadatas, validationErrors); + })); + } + else { + _this.performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors); + } + }); + }; + ValidationExecutor.prototype.whitelist = function (object, groupedMetadatas, validationErrors) { + var _this = this; + var notAllowedProperties = []; + Object.keys(object).forEach(function (propertyName) { + // does this property have no metadata? + if (!groupedMetadatas[propertyName] || groupedMetadatas[propertyName].length === 0) + notAllowedProperties.push(propertyName); + }); + if (notAllowedProperties.length > 0) { + if (this.validatorOptions && this.validatorOptions.forbidNonWhitelisted) { + // throw errors + notAllowedProperties.forEach(function (property) { + var _a; + var validationError = _this.generateValidationError(object, object[property], property); + validationError.constraints = (_a = {}, _a[ValidationTypes.WHITELIST] = "property " + property + " should not exist", _a); + validationError.children = undefined; + validationErrors.push(validationError); + }); + } + else { + // strip non allowed properties + notAllowedProperties.forEach(function (property) { return delete object[property]; }); + } + } + }; + ValidationExecutor.prototype.stripEmptyErrors = function (errors) { + var _this = this; + return errors.filter(function (error) { + if (error.children) { + error.children = _this.stripEmptyErrors(error.children); + } + if (Object.keys(error.constraints).length === 0) { + if (error.children.length === 0) { + return false; + } + else { + delete error.constraints; + } + } + return true; + }); + }; + // ------------------------------------------------------------------------- + // Private Methods + // ------------------------------------------------------------------------- + ValidationExecutor.prototype.performValidations = function (object, value, propertyName, definedMetadatas, metadatas, validationErrors) { + var customValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.CUSTOM_VALIDATION; }); + var nestedValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.NESTED_VALIDATION; }); + var conditionalValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.CONDITIONAL_VALIDATION; }); + var validationError = this.generateValidationError(object, value, propertyName); + validationErrors.push(validationError); + var canValidate = this.conditionalValidations(object, value, conditionalValidationMetadatas); + if (!canValidate) { + return; + } + // handle IS_DEFINED validation type the special way - it should work no matter skipUndefinedProperties/skipMissingProperties is set or not + this.customValidations(object, value, definedMetadatas, validationError); + this.mapContexts(object, value, definedMetadatas, validationError); + if (value === undefined && this.validatorOptions && this.validatorOptions.skipUndefinedProperties === true) { + return; + } + if (value === null && this.validatorOptions && this.validatorOptions.skipNullProperties === true) { + return; + } + if ((value === null || value === undefined) && this.validatorOptions && this.validatorOptions.skipMissingProperties === true) { + return; + } + this.customValidations(object, value, customValidationMetadatas, validationError); + this.nestedValidations(value, nestedValidationMetadatas, validationError.children); + this.mapContexts(object, value, metadatas, validationError); + this.mapContexts(object, value, customValidationMetadatas, validationError); + }; + ValidationExecutor.prototype.generateValidationError = function (object, value, propertyName) { + var validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.value === undefined || + this.validatorOptions.validationError.value === true) + validationError.value = value; + validationError.property = propertyName; + validationError.children = []; + validationError.constraints = {}; + return validationError; + }; + ValidationExecutor.prototype.conditionalValidations = function (object, value, metadatas) { + return metadatas + .map(function (metadata) { return metadata.constraints[0](object, value); }) + .reduce(function (resultA, resultB) { return resultA && resultB; }, true); + }; + ValidationExecutor.prototype.customValidations = function (object, value, metadatas, error) { + var _this = this; + metadatas.forEach(function (metadata) { + _this.metadataStorage + .getTargetValidatorConstraints(metadata.constraintCls) + .forEach(function (customConstraintMetadata) { + if (customConstraintMetadata.async && _this.ignoreAsyncValidations) + return; + var validationArguments = { + targetName: object.constructor ? object.constructor.name : undefined, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + if (!metadata.each || !(value instanceof Array || value instanceof Set || value instanceof Map)) { + var validatedValue = customConstraintMetadata.instance.validate(value, validationArguments); + if (isPromise(validatedValue)) { + var promise = validatedValue.then(function (isValid) { + if (!isValid) { + var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1]; + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + _this.awaitingPromises.push(promise); + } + else { + if (!validatedValue) { + var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1]; + error.constraints[type] = message; + } + } + return; + } + // convert set and map into array + var arrayValue = convertToArray(value); + // Validation needs to be applied to each array item + var validatedSubValues = arrayValue.map(function (subValue) { return customConstraintMetadata.instance.validate(subValue, validationArguments); }); + var validationIsAsync = validatedSubValues + .some(function (validatedSubValue) { return isPromise(validatedSubValue); }); + if (validationIsAsync) { + // Wrap plain values (if any) in promises, so that all are async + var asyncValidatedSubValues = validatedSubValues + .map(function (validatedSubValue) { return isPromise(validatedSubValue) ? validatedSubValue : Promise.resolve(validatedSubValue); }); + var asyncValidationIsFinishedPromise = Promise.all(asyncValidatedSubValues) + .then(function (flatValidatedValues) { + var validationResult = flatValidatedValues.every(function (isValid) { return isValid; }); + if (!validationResult) { + var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1]; + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + _this.awaitingPromises.push(asyncValidationIsFinishedPromise); + return; + } + var validationResult = validatedSubValues.every(function (isValid) { return isValid; }); + if (!validationResult) { + var _b = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _b[0], message = _b[1]; + error.constraints[type] = message; + } + }); + }); + }; + ValidationExecutor.prototype.nestedValidations = function (value, metadatas, errors) { + var _this = this; + if (value === void 0) { + return; + } + metadatas.forEach(function (metadata) { + var _a; + if (metadata.type !== ValidationTypes.NESTED_VALIDATION && + metadata.type !== ValidationTypes.PROMISE_VALIDATION) { + return; + } + if (value instanceof Array || value instanceof Set || value instanceof Map) { + // Treats Set as an array - as index of Set value is value itself and it is common case to have Object as value + var arrayLikeValue = value instanceof Set ? Array.from(value) : value; + arrayLikeValue.forEach(function (subValue, index) { + _this.performValidations(value, subValue, index.toString(), [], metadatas, errors); + }); + } + else if (value instanceof Object) { + var targetSchema = typeof metadata.target === "string" ? metadata.target : metadata.target.name; + _this.execute(value, targetSchema, errors); + } + else { + var error = new ValidationError(); + error.value = value; + error.property = metadata.propertyName; + error.target = metadata.target; + var _b = _this.createValidationError(metadata.target, value, metadata), type = _b[0], message = _b[1]; + error.constraints = (_a = {}, + _a[type] = message, + _a); + errors.push(error); + } + }); + }; + ValidationExecutor.prototype.mapContexts = function (object, value, metadatas, error) { + var _this = this; + return metadatas + .forEach(function (metadata) { + if (metadata.context) { + var customConstraint = void 0; + if (metadata.type === ValidationTypes.CUSTOM_VALIDATION) { + var customConstraints = _this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls); + customConstraint = customConstraints[0]; + } + var type = _this.getConstraintType(metadata, customConstraint); + if (error.constraints[type]) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + }; + ValidationExecutor.prototype.createValidationError = function (object, value, metadata, customValidatorMetadata) { + var targetName = object.constructor ? object.constructor.name : undefined; + var type = this.getConstraintType(metadata, customValidatorMetadata); + var validationArguments = { + targetName: targetName, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + var message = metadata.message || ""; + if (!metadata.message && + (!this.validatorOptions || (this.validatorOptions && !this.validatorOptions.dismissDefaultMessages))) { + if (customValidatorMetadata && customValidatorMetadata.instance.defaultMessage instanceof Function) { + message = customValidatorMetadata.instance.defaultMessage(validationArguments); + } + } + var messageString = ValidationUtils.replaceMessageSpecialTokens(message, validationArguments); + return [type, messageString]; + }; + ValidationExecutor.prototype.getConstraintType = function (metadata, customValidatorMetadata) { + var type = customValidatorMetadata && customValidatorMetadata.name ? customValidatorMetadata.name : metadata.type; + return type; + }; + return ValidationExecutor; + }()); + + /** + * Validator performs validation of the given object based on its metadata. + */ + var Validator = /** @class */ (function () { + function Validator() { + } + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + /** + * Performs validation of the given object based on decorators or validation schema. + * Common method for `validateOrReject` and `validate` methods. + */ + Validator.prototype.coreValidate = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + var object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + var options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + var schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + var executor = new ValidationExecutor(this, options); + var validationErrors = []; + executor.execute(object, schema, validationErrors); + return Promise.all(executor.awaitingPromises).then(function () { + return executor.stripEmptyErrors(validationErrors); + }); + }; + /** + * Performs validation of the given object based on decorators or validation schema. + */ + Validator.prototype.validate = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + return this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + }; + /** + * Performs validation of the given object based on decorators or validation schema and reject on error. + */ + Validator.prototype.validateOrReject = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var errors; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions)]; + case 1: + errors = _a.sent(); + if (errors.length) + return [2 /*return*/, Promise.reject(errors)]; + return [2 /*return*/]; + } + }); + }); + }; + /** + * Performs validation of the given object based on decorators or validation schema. + */ + Validator.prototype.validateSync = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + var object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + var options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + var schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + var executor = new ValidationExecutor(this, options); + executor.ignoreAsyncValidations = true; + var validationErrors = []; + executor.execute(object, schema, validationErrors); + return executor.stripEmptyErrors(validationErrors); + }; + return Validator; + }()); + + /** + * Container to be used by this library for inversion control. If container was not implicitly set then by default + * container simply creates a new instance of the given class. + */ + var defaultContainer = new (/** @class */ (function () { + function class_1() { + this.instances = []; + } + class_1.prototype.get = function (someClass) { + var instance = this.instances.find(function (instance) { return instance.type === someClass; }); + if (!instance) { + instance = { type: someClass, object: new someClass() }; + this.instances.push(instance); + } + return instance.object; + }; + return class_1; + }()))(); + var userContainer; + var userContainerOptions; + /** + * Sets container to be used by this library. + */ + function useContainer(iocContainer, options) { + userContainer = iocContainer; + userContainerOptions = options; + } + /** + * Gets the IOC container used by this library. + */ + function getFromContainer(someClass) { + if (userContainer) { + try { + var instance = userContainer.get(someClass); + if (instance) + return instance; + if (!userContainerOptions || !userContainerOptions.fallback) + return instance; + } + catch (error) { + if (!userContainerOptions || !userContainerOptions.fallbackOnErrors) + throw error; + } + } + return defaultContainer.get(someClass); + } + + /** + * If object has both allowed and not allowed properties a validation error will be thrown. + */ + function Allow(validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.WHITELIST, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; + } + + /** + * This metadata interface contains information for custom validators. + */ + var ConstraintMetadata = /** @class */ (function () { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + function ConstraintMetadata(target, name, async) { + if (async === void 0) { async = false; } + this.target = target; + this.name = name; + this.async = async; + } + Object.defineProperty(ConstraintMetadata.prototype, "instance", { + // ------------------------------------------------------------------------- + // Accessors + // ------------------------------------------------------------------------- + /** + * Instance of the target custom validation class which performs validation. + */ + get: function () { + return getFromContainer(this.target); + }, + enumerable: true, + configurable: true + }); + return ConstraintMetadata; + }()); + + /** + * Registers a custom validation decorator. + */ + function registerDecorator(options) { + var constraintCls; + if (options.validator instanceof Function) { + constraintCls = options.validator; + var constraintClasses = getFromContainer(MetadataStorage).getTargetValidatorConstraints(options.validator); + if (constraintClasses.length > 1) { + throw "More than one implementation of ValidatorConstraintInterface found for validator on: " + options.target + ":" + options.propertyName; + } + } + else { + var validator_1 = options.validator; + constraintCls = /** @class */ (function () { + function CustomConstraint() { + } + CustomConstraint.prototype.validate = function (value, validationArguments) { + return validator_1.validate(value, validationArguments); + }; + CustomConstraint.prototype.defaultMessage = function (validationArguments) { + if (validator_1.defaultMessage) { + return validator_1.defaultMessage(validationArguments); + } + return ""; + }; + return CustomConstraint; + }()); + getMetadataStorage().addConstraintMetadata(new ConstraintMetadata(constraintCls, options.name, options.async)); + } + var validationMetadataArgs = { + type: options.name && ValidationTypes.isValid(options.name) ? options.name : ValidationTypes.CUSTOM_VALIDATION, + target: options.target, + propertyName: options.propertyName, + validationOptions: options.options, + constraintCls: constraintCls, + constraints: options.constraints + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(validationMetadataArgs)); + } + + function buildMessage(impl, validationOptions) { + return function (validationArguments) { + var eachPrefix = validationOptions && validationOptions.each + ? "each value in " + : ""; + return impl(eachPrefix, validationArguments); + }; + } + function ValidateBy(options, validationOptions) { + return function (object, propertyName) { + registerDecorator({ + name: options.name, + target: object.constructor, + propertyName: propertyName, + options: validationOptions, + constraints: options.constraints, + validator: options.validator + }); + }; + } + + // isDefined is (yet) a special case + var IS_DEFINED = ValidationTypes.IS_DEFINED; + /** + * Checks if value is defined (!== undefined, !== null). + */ + function isDefined(value) { + return value !== undefined && value !== null; + } + /** + * Checks if value is defined (!== undefined, !== null). + */ + function IsDefined(validationOptions) { + return ValidateBy({ + name: IS_DEFINED, + validator: { + validate: function (value) { return isDefined(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be null or undefined"; }, validationOptions) + } + }, validationOptions); + } + + /** + * Checks if value is missing and if so, ignores all validators. + */ + function IsOptional(validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [function (object, value) { + return object[propertyName] !== null && object[propertyName] !== undefined; + }], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; + } + + /** + * Registers custom validator class. + */ + function ValidatorConstraint(options) { + return function (target) { + var isAsync = options && options.async ? true : false; + var name = options && options.name ? options.name : ""; + if (!name) { + name = target.name; + if (!name) // generate name if it was not given + name = name.replace(/\.?([A-Z]+)/g, function (x, y) { return "_" + y.toLowerCase(); }).replace(/^_/, ""); + } + var metadata = new ConstraintMetadata(target, name, isAsync); + getMetadataStorage().addConstraintMetadata(metadata); + }; + } + function Validate(constraintClass, constraintsOrValidationOptions, maybeValidationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.CUSTOM_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraintCls: constraintClass, + constraints: constraintsOrValidationOptions instanceof Array ? constraintsOrValidationOptions : undefined, + validationOptions: !(constraintsOrValidationOptions instanceof Array) ? constraintsOrValidationOptions : maybeValidationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; + } + + /** + * Objects / object arrays marked with this decorator will also be validated. + */ + function ValidateIf(condition, validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [condition], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; + } + + /** + * Objects / object arrays marked with this decorator will also be validated. + */ + function ValidateNested(validationOptions) { + var opts = tslib_1.__assign({}, validationOptions); + var eachPrefix = opts.each ? "each value in " : ""; + opts.message = opts.message || eachPrefix + "nested property $property must be either object or array"; + return function (object, propertyName) { + var args = { + type: ValidationTypes.NESTED_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: opts, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; + } + + /** + * Resolve promise before validation + */ + function ValidatePromise(validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.PROMISE_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; + } + + var IS_LATLONG = "isLatLong"; + /** + * Checks if a value is string in format a "latitude,longitude". + */ + function isLatLong(value) { + return typeof value === "string" && validator.isLatLong(value); + } + /** + * Checks if a value is string in format a "latitude,longitude". + */ + function IsLatLong(validationOptions) { + return ValidateBy({ + name: IS_LATLONG, + validator: { + validate: function (value, args) { return isLatLong(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a latitude,longitude string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_LATITUDE = "isLatitude"; + /** + * Checks if a given value is a latitude. + */ + function isLatitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong(value + ",0"); + } + /** + * Checks if a given value is a latitude. + */ + function IsLatitude(validationOptions) { + return ValidateBy({ + name: IS_LATITUDE, + validator: { + validate: function (value, args) { return isLatitude(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a latitude string or number"; }, validationOptions) + } + }, validationOptions); + } + + var IS_LONGITUDE = "isLongitude"; + /** + * Checks if a given value is a longitude. + */ + function isLongitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong("0," + value); + } + /** + * Checks if a given value is a longitude. + */ + function IsLongitude(validationOptions) { + return ValidateBy({ + name: IS_LONGITUDE, + validator: { + validate: function (value, args) { return isLongitude(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a longitude string or number"; }, validationOptions) + } + }, validationOptions); + } + + var EQUALS = "equals"; + /** + * Checks if value matches ("===") the comparison. + */ + function equals(value, comparison) { + return value === comparison; + } + /** + * Checks if value matches ("===") the comparison. + */ + function Equals(comparison, validationOptions) { + return ValidateBy({ + name: EQUALS, + constraints: [comparison], + validator: { + validate: function (value, args) { return equals(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be equal to $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var NOT_EQUALS = "notEquals"; + /** + * Checks if value does not match ("!==") the comparison. + */ + function notEquals(value, comparison) { + return value !== comparison; + } + /** + * Checks if value does not match ("!==") the comparison. + */ + function NotEquals(comparison, validationOptions) { + return ValidateBy({ + name: NOT_EQUALS, + constraints: [comparison], + validator: { + validate: function (value, args) { return notEquals(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be equal to $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var IS_EMPTY = "isEmpty"; + /** + * Checks if given value is empty (=== '', === null, === undefined). + */ + function isEmpty(value) { + return value === "" || value === null || value === undefined; + } + /** + * Checks if given value is empty (=== '', === null, === undefined). + */ + function IsEmpty(validationOptions) { + return ValidateBy({ + name: IS_EMPTY, + validator: { + validate: function (value, args) { return isEmpty(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be empty"; }, validationOptions) + } + }, validationOptions); + } + + var IS_NOT_EMPTY = "isNotEmpty"; + /** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ + function isNotEmpty(value) { + return value !== "" && value !== null && value !== undefined; + } + /** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ + function IsNotEmpty(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY, + validator: { + validate: function (value, args) { return isNotEmpty(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be empty"; }, validationOptions) + } + }, validationOptions); + } + + var IS_IN = "isIn"; + /** + * Checks if given value is in a array of allowed values. + */ + function isIn(value, possibleValues) { + return !(possibleValues instanceof Array) || possibleValues.some(function (possibleValue) { return possibleValue === value; }); + } + /** + * Checks if given value is in a array of allowed values. + */ + function IsIn(values, validationOptions) { + return ValidateBy({ + name: IS_IN, + constraints: [values], + validator: { + validate: function (value, args) { return isIn(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be one of the following values: $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var IS_NOT_IN = "isNotIn"; + /** + * Checks if given value not in a array of allowed values. + */ + function isNotIn(value, possibleValues) { + return !(possibleValues instanceof Array) || !possibleValues.some(function (possibleValue) { return possibleValue === value; }); + } + /** + * Checks if given value not in a array of allowed values. + */ + function IsNotIn(values, validationOptions) { + return ValidateBy({ + name: IS_NOT_IN, + constraints: [values], + validator: { + validate: function (value, args) { return isNotIn(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be one of the following values: $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var IS_DIVISIBLE_BY = "isDivisibleBy"; + /** + * Checks if value is a number that's divisible by another. + */ + function isDivisibleBy(value, num) { + return typeof value === "number" && + typeof num === "number" && + validator.isDivisibleBy(String(value), num); + } + /** + * Checks if value is a number that's divisible by another. + */ + function IsDivisibleBy(num, validationOptions) { + return ValidateBy({ + name: IS_DIVISIBLE_BY, + constraints: [num], + validator: { + validate: function (value, args) { return isDivisibleBy(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be divisible by $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var IS_POSITIVE = "isPositive"; + /** + * Checks if the value is a positive number greater than zero. + */ + function isPositive(value) { + return typeof value === "number" && value > 0; + } + /** + * Checks if the value is a positive number greater than zero. + */ + function IsPositive(validationOptions) { + return ValidateBy({ + name: IS_POSITIVE, + validator: { + validate: function (value, args) { return isPositive(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a positive number"; }, validationOptions) + } + }, validationOptions); + } + + var IS_NEGATIVE = "isNegative"; + /** + * Checks if the value is a negative number smaller than zero. + */ + function isNegative(value) { + return typeof value === "number" && value < 0; + } + /** + * Checks if the value is a negative number smaller than zero. + */ + function IsNegative(validationOptions) { + return ValidateBy({ + name: IS_NEGATIVE, + validator: { + validate: function (value, args) { return isNegative(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a negative number"; }, validationOptions) + } + }, validationOptions); + } + + var MAX = "max"; + /** + * Checks if the first number is less than or equal to the second. + */ + function max(num, max) { + return typeof num === "number" && typeof max === "number" && num <= max; + } + /** + * Checks if the first number is less than or equal to the second. + */ + function Max(maxValue, validationOptions) { + return ValidateBy({ + name: MAX, + constraints: [maxValue], + validator: { + validate: function (value, args) { return max(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must not be greater than $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var MIN = "min"; + /** + * Checks if the first number is greater than or equal to the second. + */ + function min(num, min) { + return typeof num === "number" && typeof min === "number" && num >= min; + } + /** + * Checks if the first number is greater than or equal to the second. + */ + function Min(minValue, validationOptions) { + return ValidateBy({ + name: MIN, + constraints: [minValue], + validator: { + validate: function (value, args) { return min(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must not be less than $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var MIN_DATE = "minDate"; + /** + * Checks if the value is a date that's after the specified date. + */ + function minDate(date, minDate) { + return date instanceof Date && date.getTime() >= minDate.getTime(); + } + /** + * Checks if the value is a date that's after the specified date. + */ + function MinDate(date, validationOptions) { + return ValidateBy({ + name: MIN_DATE, + constraints: [date], + validator: { + validate: function (value, args) { return minDate(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return "minimal allowed date for " + eachPrefix + "$property is $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var MAX_DATE = "maxDate"; + /** + * Checks if the value is a date that's before the specified date. + */ + function maxDate(date, maxDate) { + return date instanceof Date && date.getTime() <= maxDate.getTime(); + } + /** + * Checks if the value is a date that's after the specified date. + */ + function MaxDate(date, validationOptions) { + return ValidateBy({ + name: MAX_DATE, + constraints: [date], + validator: { + validate: function (value, args) { return maxDate(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return "maximal allowed date for " + eachPrefix + "$property is $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var CONTAINS = "contains"; + /** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ + function contains(value, seed) { + return typeof value === "string" && validator.contains(value, seed); + } + /** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ + function Contains(seed, validationOptions) { + return ValidateBy({ + name: CONTAINS, + constraints: [seed], + validator: { + validate: function (value, args) { return contains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a $constraint1 string"; }, validationOptions) + } + }, validationOptions); + } + + var NOT_CONTAINS = "notContains"; + /** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ + function notContains(value, seed) { + return typeof value === "string" && !validator.contains(value, seed); + } + /** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ + function NotContains(seed, validationOptions) { + return ValidateBy({ + name: NOT_CONTAINS, + constraints: [seed], + validator: { + validate: function (value, args) { return notContains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not contain a $constraint1 string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ALPHA = "isAlpha"; + /** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ + function isAlpha(value, locale) { + return typeof value === "string" && validator.isAlpha(value, locale); + } + /** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ + function IsAlpha(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHA, + constraints: [locale], + validator: { + validate: function (value, args) { return isAlpha(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain only letters (a-zA-Z)"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ALPHANUMERIC = "isAlphanumeric"; + /** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ + function isAlphanumeric(value, locale) { + return typeof value === "string" && validator.isAlphanumeric(value, locale); + } + /** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ + function IsAlphanumeric(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHANUMERIC, + constraints: [locale], + validator: { + validate: function (value, args) { return isAlphanumeric(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain only letters and numbers"; }, validationOptions) + } + }, validationOptions); + } + + var IS_DECIMAL = "isDecimal"; + /** + * Checks if the string is a valid decimal. + * If given value is not a string, then it returns false. + */ + function isDecimal(value, options) { + return typeof value === "string" && validator.isDecimal(value, options); + } + /** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ + function IsDecimal(options, validationOptions) { + return ValidateBy({ + name: IS_DECIMAL, + constraints: [options], + validator: { + validate: function (value, args) { return isDecimal(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property is not a valid decimal number."; }, validationOptions) + } + }, validationOptions); + } + + var IS_ASCII = "isAscii"; + /** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ + function isAscii(value) { + return typeof value === "string" && validator.isAscii(value); + } + /** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ + function IsAscii(validationOptions) { + return ValidateBy({ + name: IS_ASCII, + validator: { + validate: function (value, args) { return isAscii(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain only ASCII characters"; }, validationOptions) + } + }, validationOptions); + } + + var IS_BASE64 = "isBase64"; + /** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ + function isBase64(value) { + return typeof value === "string" && validator.isBase64(value); + } + /** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ + function IsBase64(validationOptions) { + return ValidateBy({ + name: IS_BASE64, + validator: { + validate: function (value, args) { return isBase64(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be base64 encoded"; }, validationOptions) + } + }, validationOptions); + } + + var IS_BYTE_LENGTH = "isByteLength"; + /** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ + function isByteLength(value, min, max) { + return typeof value === "string" && validator.isByteLength(value, { min: min, max: max }); + } + /** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ + function IsByteLength(min, max, validationOptions) { + return ValidateBy({ + name: IS_BYTE_LENGTH, + constraints: [min, max], + validator: { + validate: function (value, args) { return isByteLength(value, args.constraints[0], args.constraints[1]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property's byte length must fall into ($constraint1, $constraint2) range"; }, validationOptions) + } + }, validationOptions); + } + + var IS_CREDIT_CARD = "isCreditCard"; + /** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ + function isCreditCard(value) { + return typeof value === "string" && validator.isCreditCard(value); + } + /** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ + function IsCreditCard(validationOptions) { + return ValidateBy({ + name: IS_CREDIT_CARD, + validator: { + validate: function (value, args) { return isCreditCard(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a credit card"; }, validationOptions) + } + }, validationOptions); + } + + var IS_CURRENCY = "isCurrency"; + /** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ + function isCurrency(value, options) { + return typeof value === "string" && validator.isCurrency(value, options); + } + /** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ + function IsCurrency(options, validationOptions) { + return ValidateBy({ + name: IS_CURRENCY, + constraints: [options], + validator: { + validate: function (value, args) { return isCurrency(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a currency"; }, validationOptions) + } + }, validationOptions); + } + + var IS_EMAIL = "isEmail"; + /** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ + function isEmail(value, options) { + return typeof value === "string" && validator.isEmail(value, options); + } + /** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ + function IsEmail(options, validationOptions) { + return ValidateBy({ + name: IS_EMAIL, + constraints: [options], + validator: { + validate: function (value, args) { return isEmail(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an email"; }, validationOptions) + } + }, validationOptions); + } + + var IS_FQDN = "isFqdn"; + /** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ + function isFQDN(value, options) { + return typeof value === "string" && validator.isFQDN(value, options); + } + /** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ + function IsFQDN(options, validationOptions) { + return ValidateBy({ + name: IS_FQDN, + constraints: [options], + validator: { + validate: function (value, args) { return isFQDN(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid domain name"; }, validationOptions) + } + }, validationOptions); + } + + var IS_FULL_WIDTH = "isFullWidth"; + /** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ + function isFullWidth(value) { + return typeof value === "string" && validator.isFullWidth(value); + } + /** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ + function IsFullWidth(validationOptions) { + return ValidateBy({ + name: IS_FULL_WIDTH, + validator: { + validate: function (value, args) { return isFullWidth(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a full-width characters"; }, validationOptions) + } + }, validationOptions); + } + + var IS_HALF_WIDTH = "isHalfWidth"; + /** + * Checks if the string contains any half-width chars. + * If given value is not a string, then it returns false. + */ + function isHalfWidth(value) { + return typeof value === "string" && validator.isHalfWidth(value); + } + /** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ + function IsHalfWidth(validationOptions) { + return ValidateBy({ + name: IS_HALF_WIDTH, + validator: { + validate: function (value, args) { return isHalfWidth(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a half-width characters"; }, validationOptions) + } + }, validationOptions); + } + + var IS_VARIABLE_WIDTH = "isVariableWidth"; + /** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ + function isVariableWidth(value) { + return typeof value === "string" && validator.isVariableWidth(value); + } + /** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ + function IsVariableWidth(validationOptions) { + return ValidateBy({ + name: IS_VARIABLE_WIDTH, + validator: { + validate: function (value, args) { return isVariableWidth(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a full-width and half-width characters"; }, validationOptions) + } + }, validationOptions); + } + + var IS_HEX_COLOR = "isHexColor"; + /** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ + function isHexColor(value) { + return typeof value === "string" && validator.isHexColor(value); + } + /** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ + function IsHexColor(validationOptions) { + return ValidateBy({ + name: IS_HEX_COLOR, + validator: { + validate: function (value, args) { return isHexColor(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a hexadecimal color"; }, validationOptions) + } + }, validationOptions); + } + + var IS_HEXADECIMAL = "isHexadecimal"; + /** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ + function isHexadecimal(value) { + return typeof value === "string" && validator.isHexadecimal(value); + } + /** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ + function IsHexadecimal(validationOptions) { + return ValidateBy({ + name: IS_HEXADECIMAL, + validator: { + validate: function (value, args) { return isHexadecimal(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a hexadecimal number"; }, validationOptions) + } + }, validationOptions); + } + + function isValidationOptions(val) { + if (!val) { + return false; + } + return "each" in val + || "message" in val + || "groups" in val + || "always" in val + || "context" in val; + } + + var IS_MAC_ADDRESS = "isMacAddress"; + /** + * Check if the string is a MAC address. + * If given value is not a string, then it returns false. + */ + function isMACAddress(value, options) { + return typeof value === "string" && validator.isMACAddress(value, options); + } + function IsMACAddress(optionsOrValidationOptionsArg, validationOptionsArg) { + var options = !isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : undefined; + var validationOptions = isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : validationOptionsArg; + return ValidateBy({ + name: IS_MAC_ADDRESS, + constraints: [options], + validator: { + validate: function (value, args) { return isMACAddress(value, options); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a MAC Address"; }, validationOptions) + } + }, validationOptions); + } + + var IS_IP = "isIp"; + /** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ + function isIP(value, version) { + var versionStr = version ? "" + version : undefined; + return typeof value === "string" && validator.isIP(value, versionStr); + } + /** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ + function IsIP(version, validationOptions) { + return ValidateBy({ + name: IS_IP, + constraints: [version], + validator: { + validate: function (value, args) { return isIP(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ip address"; }, validationOptions) + } + }, validationOptions); + } + + var IS_PORT = "isPort"; + /** + * Check if the string is a valid port number. + */ + function isPort(value) { + return typeof value === "string" && validator.isPort(value); + } + /** + * Check if the string is a valid port number. + */ + function IsPort(validationOptions) { + return ValidateBy({ + name: IS_PORT, + validator: { + validate: function (value, args) { return isPort(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a port"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ISBN = "isIsbn"; + /** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ + function isISBN(value, version) { + var versionStr = version ? "" + version : undefined; + return typeof value === "string" && validator.isISBN(value, versionStr); + } + /** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ + function IsISBN(version, validationOptions) { + return ValidateBy({ + name: IS_ISBN, + constraints: [version], + validator: { + validate: function (value, args) { return isISBN(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ISBN"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ISIN = "isIsin"; + /** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ + function isISIN(value) { + return typeof value === "string" && validator.isISIN(value); + } + /** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ + function IsISIN(validationOptions) { + return ValidateBy({ + name: IS_ISIN, + validator: { + validate: function (value, args) { return isISIN(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ISIN (stock/security identifier)"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ISO8601 = "isIso8601"; + /** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ + function isISO8601(value, options) { + return typeof value === "string" && validator.isISO8601(value, options); + } + /** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ + function IsISO8601(options, validationOptions) { + return ValidateBy({ + name: IS_ISO8601, + constraints: [options], + validator: { + validate: function (value, args) { return isISO8601(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid ISO 8601 date string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_JSON = "isJson"; + /** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ + function isJSON(value) { + return typeof value === "string" && validator.isJSON(value); + } + /** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ + function IsJSON(validationOptions) { + return ValidateBy({ + name: IS_JSON, + validator: { + validate: function (value, args) { return isJSON(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a json string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_JWT = "isJwt"; + /** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ + function isJWT(value) { + return typeof value === "string" && validator.isJWT(value); + } + /** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ + function IsJWT(validationOptions) { + return ValidateBy({ + name: IS_JWT, + validator: { + validate: function (value, args) { return isJWT(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a jwt string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_LOWERCASE = "isLowercase"; + /** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ + function isLowercase(value) { + return typeof value === "string" && validator.isLowercase(value); + } + /** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ + function IsLowercase(validationOptions) { + return ValidateBy({ + name: IS_LOWERCASE, + validator: { + validate: function (value, args) { return isLowercase(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a lowercase string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_MOBILE_PHONE = "isMobilePhone"; + /** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ + function isMobilePhone(value, locale, options) { + return typeof value === "string" && validator.isMobilePhone(value, locale, options); + } + /** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ + function IsMobilePhone(locale, options, validationOptions) { + return ValidateBy({ + name: IS_MOBILE_PHONE, + constraints: [locale, options], + validator: { + validate: function (value, args) { return isMobilePhone(value, args.constraints[0], args.constraints[1]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a phone number"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ISO31661_ALPHA_2 = "isISO31661Alpha2"; + /** + * 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. + */ + function isISO31661Alpha2(value) { + return typeof value === "string" && validator.isISO31661Alpha2(value); + } + /** + * 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. + */ + function IsISO31661Alpha2(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_2, + validator: { + validate: function (value, args) { return isISO31661Alpha2(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid ISO31661 Alpha2 code"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ISO31661_ALPHA_3 = "isISO31661Alpha3"; + /** + * 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. + */ + function isISO31661Alpha3(value) { + return typeof value === "string" && validator.isISO31661Alpha3(value); + } + /** + * 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. + */ + function IsISO31661Alpha3(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_3, + validator: { + validate: function (value, args) { return isISO31661Alpha3(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid ISO31661 Alpha3 code"; }, validationOptions) + } + }, validationOptions); + } + + var IS_MONGO_ID = "isMongoId"; + /** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ + function isMongoId(value) { + return typeof value === "string" && validator.isMongoId(value); + } + /** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ + function IsMongoId(validationOptions) { + return ValidateBy({ + name: IS_MONGO_ID, + validator: { + validate: function (value, args) { return isMongoId(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a mongodb id"; }, validationOptions) + } + }, validationOptions); + } + + var IS_MULTIBYTE = "isMultibyte"; + /** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ + function isMultibyte(value) { + return typeof value === "string" && validator.isMultibyte(value); + } + /** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ + function IsMultibyte(validationOptions) { + return ValidateBy({ + name: IS_MULTIBYTE, + validator: { + validate: function (value, args) { return isMultibyte(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain one or more multibyte chars"; }, validationOptions) + } + }, validationOptions); + } + + var IS_SURROGATE_PAIR = "isSurrogatePair"; + /** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ + function isSurrogatePair(value) { + return typeof value === "string" && validator.isSurrogatePair(value); + } + /** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ + function IsSurrogatePair(validationOptions) { + return ValidateBy({ + name: IS_SURROGATE_PAIR, + validator: { + validate: function (value, args) { return isSurrogatePair(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain any surrogate pairs chars"; }, validationOptions) + } + }, validationOptions); + } + + var IS_URL = "isUrl"; + /** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ + function isURL(value, options) { + return typeof value === "string" && validator.isURL(value, options); + } + /** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ + function IsUrl(options, validationOptions) { + return ValidateBy({ + name: IS_URL, + constraints: [options], + validator: { + validate: function (value, args) { return isURL(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an URL address"; }, validationOptions) + } + }, validationOptions); + } + + var IS_UUID = "isUuid"; + /** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ + function isUUID(value, version) { + return typeof value === "string" && validator.isUUID(value, version); + } + /** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ + function IsUUID(version, validationOptions) { + return ValidateBy({ + name: IS_UUID, + constraints: [version], + validator: { + validate: function (value, args) { return isUUID(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an UUID"; }, validationOptions) + } + }, validationOptions); + } + + var IS_FIREBASE_PUSH_ID = "IsFirebasePushId"; + /** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ + function isFirebasePushId(value) { + var webSafeRegex = /^[a-zA-Z0-9_-]*$/; + return typeof value === "string" && value.length === 20 && webSafeRegex.test(value); + } + /** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ + function IsFirebasePushId(validationOptions) { + return ValidateBy({ + name: IS_FIREBASE_PUSH_ID, + validator: { + validate: function (value, args) { return isFirebasePushId(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a Firebase Push Id"; }, validationOptions) + } + }, validationOptions); + } + + var IS_UPPERCASE = "isUppercase"; + /** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ + function isUppercase(value) { + return typeof value === "string" && validator.isUppercase(value); + } + /** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ + function IsUppercase(validationOptions) { + return ValidateBy({ + name: IS_UPPERCASE, + validator: { + validate: function (value, args) { return isUppercase(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be uppercase"; }, validationOptions) + } + }, validationOptions); + } + + var LENGTH = "length"; + /** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ + function length(value, min, max) { + return typeof value === "string" && validator.isLength(value, { min: min, max: max }); + } + /** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ + function Length(min, max, validationOptions) { + return ValidateBy({ + name: LENGTH, + constraints: [min, max], + validator: { + validate: function (value, args) { return length(value, args.constraints[0], args.constraints[1]); }, + defaultMessage: buildMessage(function (eachPrefix, args) { + var isMinLength = args.constraints[0] !== null && args.constraints[0] !== undefined; + var isMaxLength = args.constraints[1] !== null && args.constraints[1] !== undefined; + if (isMinLength && (!args.value || args.value.length < args.constraints[0])) { + return eachPrefix + "$property must be longer than or equal to $constraint1 characters"; + } + else if (isMaxLength && (args.value.length > args.constraints[1])) { + return eachPrefix + "$property must be shorter than or equal to $constraint2 characters"; + } + return eachPrefix + "$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"; + }, validationOptions) + } + }, validationOptions); + } + + var MAX_LENGTH = "maxLength"; + /** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ + function maxLength(value, max) { + return typeof value === "string" && validator.isLength(value, { min: 0, max: max }); + } + /** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ + function MaxLength(max, validationOptions) { + return ValidateBy({ + name: MAX_LENGTH, + constraints: [max], + validator: { + validate: function (value, args) { return maxLength(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be shorter than or equal to $constraint1 characters"; }, validationOptions) + } + }, validationOptions); + } + + var MIN_LENGTH = "minLength"; + /** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ + function minLength(value, min) { + return typeof value === "string" && validator.isLength(value, { min: min }); + } + /** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ + function MinLength(min, validationOptions) { + return ValidateBy({ + name: MIN_LENGTH, + constraints: [min], + validator: { + validate: function (value, args) { return minLength(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be longer than or equal to $constraint1 characters"; }, validationOptions) + } + }, validationOptions); + } + + var MATCHES = "matches"; + function matches(value, pattern, modifiers) { + return typeof value === "string" && validator.matches(value, pattern, modifiers); + } + function Matches(pattern, modifiersOrAnnotationOptions, validationOptions) { + var modifiers; + if (modifiersOrAnnotationOptions && modifiersOrAnnotationOptions instanceof Object && !validationOptions) { + validationOptions = modifiersOrAnnotationOptions; + } + else { + modifiers = modifiersOrAnnotationOptions; + } + return ValidateBy({ + name: MATCHES, + constraints: [pattern, modifiers], + validator: { + validate: function (value, args) { return matches(value, args.constraints[0], args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix, args) { return eachPrefix + "$property must match $constraint1 regular expression"; }, validationOptions) + } + }, validationOptions); + } + + var IS_PHONE_NUMBER = "isPhoneNumber"; + /** + * Checks if the string is a valid phone number. + * @param value the potential phone number string to test + * @param {string} region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ + function isPhoneNumber(value, region) { + var phoneUtil = googleLibphonenumber.PhoneNumberUtil.getInstance(); + try { + var phoneNum = phoneUtil.parseAndKeepRawInput(value, region); + var result = phoneUtil.isValidNumber(phoneNum); + return result; + } + catch (error) { + // logging? + return false; + } + } + /** + * Checks if the string is a valid phone number. + * @param region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ + function IsPhoneNumber(region, validationOptions) { + return ValidateBy({ + name: IS_PHONE_NUMBER, + constraints: [region], + validator: { + validate: function (value, args) { return isPhoneNumber(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid phone number"; }, validationOptions), + } + }, validationOptions); + } + + var IS_MILITARY_TIME = "isMilitaryTime"; + /** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ + function isMilitaryTime(value) { + var militaryTimeRegex = /^([01]\d|2[0-3]):?([0-5]\d)$/; + return typeof value === "string" && validator.matches(value, militaryTimeRegex); + } + /** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ + function IsMilitaryTime(validationOptions) { + return ValidateBy({ + name: IS_MILITARY_TIME, + validator: { + validate: function (value, args) { return isMilitaryTime(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid representation of military time in the format HH:MM"; }, validationOptions) + } + }, validationOptions); + } + + var IS_HASH = "isHash"; + /** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ + function isHash(value, algorithm) { + return typeof value === "string" && validator.isHash(value, algorithm); + } + /** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ + function IsHash(algorithm, validationOptions) { + return ValidateBy({ + name: IS_HASH, + constraints: [algorithm], + validator: { + validate: function (value, args) { return isHash(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a hash of type $constraint1"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ISSN = "isISSN"; + /** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ + function isISSN(value, options) { + return typeof value === "string" && validator.isISSN(value, options); + } + /** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ + function IsISSN(options, validationOptions) { + return ValidateBy({ + name: IS_ISSN, + constraints: [options], + validator: { + validate: function (value, args) { return isISSN(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a ISSN"; }, validationOptions) + } + }, validationOptions); + } + + var IS_DATE_STRING = "isDateString"; + /** + * Checks if a given value is a ISOString date. + */ + function isDateString(value) { + var 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; + return typeof value === "string" && regex.test(value); + } + /** + * Checks if a given value is a ISOString date. + */ + function IsDateString(validationOptions) { + return ValidateBy({ + name: IS_DATE_STRING, + validator: { + validate: function (value, args) { return isDateString(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a ISOString"; }, validationOptions) + } + }, validationOptions); + } + + var IS_BOOLEAN_STRING = "isBooleanString"; + /** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ + function isBooleanString(value) { + return typeof value === "string" && validator.isBoolean(value); + } + /** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ + function IsBooleanString(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN_STRING, + validator: { + validate: function (value, args) { return isBooleanString(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a boolean string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_NUMBER_STRING = "isNumberString"; + /** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ + function isNumberString(value, options) { + return typeof value === "string" && validator.isNumeric(value, options); + } + /** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ + function IsNumberString(options, validationOptions) { + return ValidateBy({ + name: IS_NUMBER_STRING, + constraints: [options], + validator: { + validate: function (value, args) { return isNumberString(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a number string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_BASE32 = "isBase32"; + /** + * Checks if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ + function isBase32(value) { + return typeof value === "string" && validator.isBase32(value); + } + /** + * Check if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ + function IsBase32(validationOptions) { + return ValidateBy({ + name: IS_BASE32, + validator: { + validate: function (value, args) { return isBase32(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be base32 encoded"; }, validationOptions) + } + }, validationOptions); + } + + var IS_BIC = "isBIC"; + /** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ + function isBIC(value) { + return typeof value === "string" && validator.isBIC(value); + } + /** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ + function IsBIC(validationOptions) { + return ValidateBy({ + name: IS_BIC, + validator: { + validate: function (value, args) { return isBIC(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a BIC or SWIFT code"; }, validationOptions) + } + }, validationOptions); + } + + var IS_BTC_ADDRESS = "isBtcAddress"; + /** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ + function isBtcAddress(value) { + return typeof value === "string" && validator.isBtcAddress(value); + } + /** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ + function IsBtcAddress(validationOptions) { + return ValidateBy({ + name: IS_BTC_ADDRESS, + validator: { + validate: function (value, args) { return isBtcAddress(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a BTC address"; }, validationOptions) + } + }, validationOptions); + } + + var IS_DATA_URI = "isDataURI"; + /** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ + function isDataURI(value) { + return typeof value === "string" && validator.isDataURI(value); + } + /** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ + function IsDataURI(validationOptions) { + return ValidateBy({ + name: IS_DATA_URI, + validator: { + validate: function (value, args) { return isDataURI(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a data uri format"; }, validationOptions) + } + }, validationOptions); + } + + var IS_EAN = "isEAN"; + /** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ + function isEAN(value) { + return typeof value === "string" && validator.isEAN(value); + } + /** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ + function IsEAN(validationOptions) { + return ValidateBy({ + name: IS_EAN, + validator: { + validate: function (value, args) { return isEAN(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an EAN (European Article Number)"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ETHEREUM_ADDRESS = "isEthereumAddress"; + /** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ + function isEthereumAddress(value) { + return typeof value === "string" && validator.isEthereumAddress(value); + } + /** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ + function IsEthereumAddress(validationOptions) { + return ValidateBy({ + name: IS_ETHEREUM_ADDRESS, + validator: { + validate: function (value, args) { return isEthereumAddress(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an Ethereum address"; }, validationOptions) + } + }, validationOptions); + } + + var IS_HSL = "isHSL"; + /** + * Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ + function isHSL(value) { + return typeof value === "string" && validator.isHSL(value); + } + /** + * Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ + function IsHSL(validationOptions) { + return ValidateBy({ + name: IS_HSL, + validator: { + validate: function (value, args) { return isHSL(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a HSL color"; }, validationOptions) + } + }, validationOptions); + } + + var IS_IBAN = "isIBAN"; + /** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ + function isIBAN(value) { + return typeof value === "string" && validator.isIBAN(value); + } + /** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ + function IsIBAN(validationOptions) { + return ValidateBy({ + name: IS_IBAN, + validator: { + validate: function (value, args) { return isIBAN(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an IBAN"; }, validationOptions) + } + }, validationOptions); + } + + var IS_IDENTITY_CARD = "isIdentityCard"; + /** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ + function isIdentityCard(value, locale) { + return typeof value === "string" && validator.isIdentityCard(value, locale); + } + /** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ + function IsIdentityCard(locale, validationOptions) { + return ValidateBy({ + name: IS_IDENTITY_CARD, + constraints: [locale], + validator: { + validate: function (value, args) { return isIdentityCard(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a identity card number"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ISRC = "isISRC"; + /** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ + function isISRC(value) { + return typeof value === "string" && validator.isISRC(value); + } + /** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ + function IsISRC(validationOptions) { + return ValidateBy({ + name: IS_ISRC, + validator: { + validate: function (value, args) { return isISRC(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ISRC"; }, validationOptions) + } + }, validationOptions); + } + + var IS_LOCALE = "isLocale"; + /** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ + function isLocale(value) { + return typeof value === "string" && validator.isLocale(value); + } + /** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ + function IsLocale(validationOptions) { + return ValidateBy({ + name: IS_LOCALE, + validator: { + validate: function (value, args) { return isLocale(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be locale"; }, validationOptions) + } + }, validationOptions); + } + + var IS_MAGNET_URI = "isMagnetURI"; + /** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ + function isMagnetURI(value) { + return typeof value === "string" && validator.isMagnetURI(value); + } + /** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ + function IsMagnetURI(validationOptions) { + return ValidateBy({ + name: IS_MAGNET_URI, + validator: { + validate: function (value, args) { return isMagnetURI(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be magnet uri format"; }, validationOptions) + } + }, validationOptions); + } + + var IS_MIME_TYPE = "isMimeType"; + /** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ + function isMimeType(value) { + return typeof value === "string" && validator.isMimeType(value); + } + /** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ + function IsMimeType(validationOptions) { + return ValidateBy({ + name: IS_MIME_TYPE, + validator: { + validate: function (value, args) { return isMimeType(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be MIME type format"; }, validationOptions) + } + }, validationOptions); + } + + var IS_OCTAL = "isOctal"; + /** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ + function isOctal(value) { + return typeof value === "string" && validator.isOctal(value); + } + /** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ + function IsOctal(validationOptions) { + return ValidateBy({ + name: IS_OCTAL, + validator: { + validate: function (value, args) { return isOctal(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be valid octal number"; }, validationOptions) + } + }, validationOptions); + } + + var IS_PASSPORT_NUMBER = "isPassportNumber"; + /** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ + function isPassportNumber(value, countryCode) { + return typeof value === "string" && validator.isPassportNumber(value, countryCode); + } + /** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ + function IsPassportNumber(countryCode, validationOptions) { + return ValidateBy({ + name: IS_PASSPORT_NUMBER, + constraints: [countryCode], + validator: { + validate: function (value, args) { return isPassportNumber(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be valid passport number"; }, validationOptions) + } + }, validationOptions); + } + + var IS_POSTAL_CODE = "isPostalCode"; + /** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ + function isPostalCode(value, locale) { + return typeof value === "string" && validator.isPostalCode(value, locale); + } + /** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ + function IsPostalCode(locale, validationOptions) { + return ValidateBy({ + name: IS_POSTAL_CODE, + constraints: [locale], + validator: { + validate: function (value, args) { return isPostalCode(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a postal code"; }, validationOptions) + } + }, validationOptions); + } + + var IS_RFC_3339 = "isRFC3339"; + /** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ + function isRFC3339(value) { + return typeof value === "string" && validator.isRFC3339(value); + } + /** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ + function IsRFC3339(validationOptions) { + return ValidateBy({ + name: IS_RFC_3339, + validator: { + validate: function (value, args) { return isRFC3339(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be RFC 3339 date"; }, validationOptions) + } + }, validationOptions); + } + + var IS_RGB_COLOR = "isRgbColor"; + /** + * Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ + function isRgbColor(value, includePercentValues) { + return typeof value === "string" && validator.isRgbColor(value, includePercentValues); + } + /** + * Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ + function IsRgbColor(includePercentValues, validationOptions) { + return ValidateBy({ + name: IS_RGB_COLOR, + constraints: [includePercentValues], + validator: { + validate: function (value, args) { return isRgbColor(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be RGB color"; }, validationOptions) + } + }, validationOptions); + } + + var IS_SEM_VER = "isSemVer"; + /** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ + function isSemVer(value) { + return typeof value === "string" && validator.isSemVer(value); + } + /** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ + function IsSemVer(validationOptions) { + return ValidateBy({ + name: IS_SEM_VER, + validator: { + validate: function (value, args) { return isSemVer(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a Semantic Versioning Specification"; }, validationOptions) + } + }, validationOptions); + } + + var IS_BOOLEAN = "isBoolean"; + /** + * Checks if a given value is a number. + */ + function isBoolean(value) { + return value instanceof Boolean || typeof value === "boolean"; + } + /** + * Checks if a value is a number. + */ + function IsBoolean(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN, + validator: { + validate: function (value, args) { return isBoolean(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a boolean value"; }, validationOptions) + } + }, validationOptions); + } + + var IS_DATE = "isDate"; + /** + * Checks if a given value is a number. + */ + function isDate(value) { + return value instanceof Date && !isNaN(value.getTime()); + } + /** + * Checks if a value is a number. + */ + function IsDate(validationOptions) { + return ValidateBy({ + name: IS_DATE, + validator: { + validate: function (value, args) { return isDate(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a Date instance"; }, validationOptions) + } + }, validationOptions); + } + + var IS_NUMBER = "isNumber"; + /** + * Checks if a given value is a number. + */ + function isNumber(value, options) { + if (options === void 0) { options = {}; } + if (typeof value !== "number") { + return false; + } + if (value === Infinity || value === -Infinity) { + return options.allowInfinity; + } + if (Number.isNaN(value)) { + return options.allowNaN; + } + if (options.maxDecimalPlaces !== undefined) { + var decimalPlaces = 0; + if ((value % 1) !== 0) { + decimalPlaces = value.toString().split(".")[1].length; + } + if (decimalPlaces > options.maxDecimalPlaces) { + return false; + } + } + return Number.isFinite(value); + } + /** + * Checks if a value is a number. + */ + function IsNumber(options, validationOptions) { + if (options === void 0) { options = {}; } + return ValidateBy({ + name: IS_NUMBER, + constraints: [options], + validator: { + validate: function (value, args) { return isNumber(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a number conforming to the specified constraints"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ENUM = "isEnum"; + /** + * Checks if a given value is an enum + */ + function isEnum(value, entity) { + var enumValues = Object.keys(entity) + .map(function (k) { return entity[k]; }); + return enumValues.indexOf(value) >= 0; + } + /** + * Checks if a given value is an enum + */ + function IsEnum(entity, validationOptions) { + return ValidateBy({ + name: IS_ENUM, + constraints: [entity], + validator: { + validate: function (value, args) { return isEnum(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid enum value"; }, validationOptions) + } + }, validationOptions); + } + + var IS_INT = "isInt"; + /** + * Checks if value is an integer. + */ + function isInt(val) { + return typeof val === "number" && Number.isInteger(val); + } + /** + * Checks if value is an integer. + */ + function IsInt(validationOptions) { + return ValidateBy({ + name: IS_INT, + validator: { + validate: function (value, args) { return isInt(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an integer number"; }, validationOptions) + } + }, validationOptions); + } + + var IS_STRING = "isString"; + /** + * Checks if a given value is a real string. + */ + function isString(value) { + return value instanceof String || typeof value === "string"; + } + /** + * Checks if a given value is a real string. + */ + function IsString(validationOptions) { + return ValidateBy({ + name: IS_STRING, + validator: { + validate: function (value, args) { return isString(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a string"; }, validationOptions) + } + }, validationOptions); + } + + var IS_ARRAY = "isArray"; + /** + * Checks if a given value is an array + */ + function isArray(value) { + return value instanceof Array; + } + /** + * Checks if a given value is an array + */ + function IsArray(validationOptions) { + return ValidateBy({ + name: IS_ARRAY, + validator: { + validate: function (value, args) { return isArray(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an array"; }, validationOptions) + } + }, validationOptions); + } + + var IS_OBJECT = "isObject"; + /** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ + function isObject(value) { + return value != null && (typeof value === "object" || typeof value === "function") && !Array.isArray(value); + } + /** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ + function IsObject(validationOptions) { + return ValidateBy({ + name: IS_OBJECT, + validator: { + validate: function (value, args) { return isObject(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an object"; }, validationOptions) + } + }, validationOptions); + } + + var ARRAY_CONTAINS = "arrayContains"; + /** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ + function arrayContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(function (value) { return array.indexOf(value) !== -1; }); + } + /** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ + function ArrayContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_CONTAINS, + constraints: [values], + validator: { + validate: function (value, args) { return arrayContains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain $constraint1 values"; }, validationOptions) + } + }, validationOptions); + } + + var ARRAY_NOT_CONTAINS = "arrayNotContains"; + /** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ + function arrayNotContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(function (value) { return array.indexOf(value) === -1; }); + } + /** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ + function ArrayNotContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_CONTAINS, + constraints: [values], + validator: { + validate: function (value, args) { return arrayNotContains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not contain $constraint1 values"; }, validationOptions) + } + }, validationOptions); + } + + var ARRAY_NOT_EMPTY = "arrayNotEmpty"; + /** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ + function arrayNotEmpty(array) { + return array instanceof Array && array.length > 0; + } + /** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ + function ArrayNotEmpty(validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_EMPTY, + validator: { + validate: function (value, args) { return arrayNotEmpty(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be empty"; }, validationOptions) + } + }, validationOptions); + } + + var ARRAY_MIN_SIZE = "arrayMinSize"; + /** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ + function arrayMinSize(array, min) { + return array instanceof Array && array.length >= min; + } + /** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ + function ArrayMinSize(min, validationOptions) { + return ValidateBy({ + name: ARRAY_MIN_SIZE, + constraints: [min], + validator: { + validate: function (value, args) { return arrayMinSize(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain at least $constraint1 elements"; }, validationOptions) + } + }, validationOptions); + } + + var ARRAY_MAX_SIZE = "arrayMaxSize"; + /** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ + function arrayMaxSize(array, max) { + return array instanceof Array && array.length <= max; + } + /** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ + function ArrayMaxSize(max, validationOptions) { + return ValidateBy({ + name: ARRAY_MAX_SIZE, + constraints: [max], + validator: { + validate: function (value, args) { return arrayMaxSize(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain not more than $constraint1 elements"; }, validationOptions) + } + }, validationOptions); + } + + var ARRAY_UNIQUE = "arrayUnique"; + /** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ + function arrayUnique(array) { + if (!(array instanceof Array)) + return false; + var uniqueItems = array.filter(function (a, b, c) { return c.indexOf(a) === b; }); + return array.length === uniqueItems.length; + } + /** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ + function ArrayUnique(validationOptions) { + return ValidateBy({ + name: ARRAY_UNIQUE, + validator: { + validate: function (value, args) { return arrayUnique(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "All $property's elements must be unique"; }, validationOptions) + } + }, validationOptions); + } + + var IS_NOT_EMPTY_OBJECT = "isNotEmptyObject"; + /** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ + function isNotEmptyObject(value) { + if (!isObject(value)) { + return false; + } + for (var key in value) { + if (value.hasOwnProperty(key)) { + return true; + } + } + return false; + } + /** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ + function IsNotEmptyObject(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY_OBJECT, + validator: { + validate: function (value, args) { return isNotEmptyObject(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a non-empty object"; }, validationOptions) + } + }, validationOptions); + } + + var IS_INSTANCE = "isInstance"; + /** + * Checks if the value is an instance of the specified object. + */ + function isInstance(object, targetTypeConstructor) { + return targetTypeConstructor + && typeof targetTypeConstructor === "function" + && object instanceof targetTypeConstructor; + } + /** + * Checks if the value is an instance of the specified object. + */ + function IsInstance(targetType, validationOptions) { + return ValidateBy({ + name: IS_INSTANCE, + constraints: [targetType], + validator: { + validate: function (value, args) { return isInstance(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix, args) { + if (args.constraints[0]) { + return eachPrefix + ("$property must be an instance of " + args.constraints[0].name); + } + else { + return eachPrefix + (IS_INSTANCE + " decorator expects and object as value, but got falsy value."); + } + }, validationOptions) + } + }, validationOptions); + } + + /** + * Validates given object by object's decorators or given validation schema. + */ + function validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions); + } + } + /** + * Validates given object by object's decorators or given validation schema and reject on error. + */ + function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions); + } + } + /** + * Validates given object by object's decorators or given validation schema. + * Note that this method completely ignores async validations. + * If you want to properly perform validation you need to call validate method instead. + */ + function validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions); + } + } + /** + * Registers a new validation schema. + */ + function registerSchema(schema) { + getMetadataStorage().addValidationSchema(schema); + } + + exports.ARRAY_CONTAINS = ARRAY_CONTAINS; + exports.ARRAY_MAX_SIZE = ARRAY_MAX_SIZE; + exports.ARRAY_MIN_SIZE = ARRAY_MIN_SIZE; + exports.ARRAY_NOT_CONTAINS = ARRAY_NOT_CONTAINS; + exports.ARRAY_NOT_EMPTY = ARRAY_NOT_EMPTY; + exports.ARRAY_UNIQUE = ARRAY_UNIQUE; + exports.Allow = Allow; + exports.ArrayContains = ArrayContains; + exports.ArrayMaxSize = ArrayMaxSize; + exports.ArrayMinSize = ArrayMinSize; + exports.ArrayNotContains = ArrayNotContains; + exports.ArrayNotEmpty = ArrayNotEmpty; + exports.ArrayUnique = ArrayUnique; + exports.CONTAINS = CONTAINS; + exports.Contains = Contains; + exports.EQUALS = EQUALS; + exports.Equals = Equals; + exports.IS_ALPHA = IS_ALPHA; + exports.IS_ALPHANUMERIC = IS_ALPHANUMERIC; + exports.IS_ARRAY = IS_ARRAY; + exports.IS_ASCII = IS_ASCII; + exports.IS_BASE32 = IS_BASE32; + exports.IS_BASE64 = IS_BASE64; + exports.IS_BIC = IS_BIC; + exports.IS_BOOLEAN = IS_BOOLEAN; + exports.IS_BOOLEAN_STRING = IS_BOOLEAN_STRING; + exports.IS_BTC_ADDRESS = IS_BTC_ADDRESS; + exports.IS_BYTE_LENGTH = IS_BYTE_LENGTH; + exports.IS_CREDIT_CARD = IS_CREDIT_CARD; + exports.IS_CURRENCY = IS_CURRENCY; + exports.IS_DATA_URI = IS_DATA_URI; + exports.IS_DATE = IS_DATE; + exports.IS_DATE_STRING = IS_DATE_STRING; + exports.IS_DECIMAL = IS_DECIMAL; + exports.IS_DEFINED = IS_DEFINED; + exports.IS_DIVISIBLE_BY = IS_DIVISIBLE_BY; + exports.IS_EAN = IS_EAN; + exports.IS_EMAIL = IS_EMAIL; + exports.IS_EMPTY = IS_EMPTY; + exports.IS_ENUM = IS_ENUM; + exports.IS_ETHEREUM_ADDRESS = IS_ETHEREUM_ADDRESS; + exports.IS_FIREBASE_PUSH_ID = IS_FIREBASE_PUSH_ID; + exports.IS_FQDN = IS_FQDN; + exports.IS_FULL_WIDTH = IS_FULL_WIDTH; + exports.IS_HALF_WIDTH = IS_HALF_WIDTH; + exports.IS_HASH = IS_HASH; + exports.IS_HEXADECIMAL = IS_HEXADECIMAL; + exports.IS_HEX_COLOR = IS_HEX_COLOR; + exports.IS_HSL = IS_HSL; + exports.IS_IBAN = IS_IBAN; + exports.IS_IDENTITY_CARD = IS_IDENTITY_CARD; + exports.IS_IN = IS_IN; + exports.IS_INSTANCE = IS_INSTANCE; + exports.IS_INT = IS_INT; + exports.IS_IP = IS_IP; + exports.IS_ISBN = IS_ISBN; + exports.IS_ISIN = IS_ISIN; + exports.IS_ISO31661_ALPHA_2 = IS_ISO31661_ALPHA_2; + exports.IS_ISO31661_ALPHA_3 = IS_ISO31661_ALPHA_3; + exports.IS_ISO8601 = IS_ISO8601; + exports.IS_ISRC = IS_ISRC; + exports.IS_ISSN = IS_ISSN; + exports.IS_JSON = IS_JSON; + exports.IS_JWT = IS_JWT; + exports.IS_LATITUDE = IS_LATITUDE; + exports.IS_LATLONG = IS_LATLONG; + exports.IS_LOCALE = IS_LOCALE; + exports.IS_LONGITUDE = IS_LONGITUDE; + exports.IS_LOWERCASE = IS_LOWERCASE; + exports.IS_MAC_ADDRESS = IS_MAC_ADDRESS; + exports.IS_MAGNET_URI = IS_MAGNET_URI; + exports.IS_MILITARY_TIME = IS_MILITARY_TIME; + exports.IS_MIME_TYPE = IS_MIME_TYPE; + exports.IS_MOBILE_PHONE = IS_MOBILE_PHONE; + exports.IS_MONGO_ID = IS_MONGO_ID; + exports.IS_MULTIBYTE = IS_MULTIBYTE; + exports.IS_NEGATIVE = IS_NEGATIVE; + exports.IS_NOT_EMPTY = IS_NOT_EMPTY; + exports.IS_NOT_EMPTY_OBJECT = IS_NOT_EMPTY_OBJECT; + exports.IS_NOT_IN = IS_NOT_IN; + exports.IS_NUMBER = IS_NUMBER; + exports.IS_NUMBER_STRING = IS_NUMBER_STRING; + exports.IS_OBJECT = IS_OBJECT; + exports.IS_OCTAL = IS_OCTAL; + exports.IS_PASSPORT_NUMBER = IS_PASSPORT_NUMBER; + exports.IS_PHONE_NUMBER = IS_PHONE_NUMBER; + exports.IS_PORT = IS_PORT; + exports.IS_POSITIVE = IS_POSITIVE; + exports.IS_POSTAL_CODE = IS_POSTAL_CODE; + exports.IS_RFC_3339 = IS_RFC_3339; + exports.IS_RGB_COLOR = IS_RGB_COLOR; + exports.IS_SEM_VER = IS_SEM_VER; + exports.IS_STRING = IS_STRING; + exports.IS_SURROGATE_PAIR = IS_SURROGATE_PAIR; + exports.IS_UPPERCASE = IS_UPPERCASE; + exports.IS_URL = IS_URL; + exports.IS_UUID = IS_UUID; + exports.IS_VARIABLE_WIDTH = IS_VARIABLE_WIDTH; + exports.IsAlpha = IsAlpha; + exports.IsAlphanumeric = IsAlphanumeric; + exports.IsArray = IsArray; + exports.IsAscii = IsAscii; + exports.IsBIC = IsBIC; + exports.IsBase32 = IsBase32; + exports.IsBase64 = IsBase64; + exports.IsBoolean = IsBoolean; + exports.IsBooleanString = IsBooleanString; + exports.IsBtcAddress = IsBtcAddress; + exports.IsByteLength = IsByteLength; + exports.IsCreditCard = IsCreditCard; + exports.IsCurrency = IsCurrency; + exports.IsDataURI = IsDataURI; + exports.IsDate = IsDate; + exports.IsDateString = IsDateString; + exports.IsDecimal = IsDecimal; + exports.IsDefined = IsDefined; + exports.IsDivisibleBy = IsDivisibleBy; + exports.IsEAN = IsEAN; + exports.IsEmail = IsEmail; + exports.IsEmpty = IsEmpty; + exports.IsEnum = IsEnum; + exports.IsEthereumAddress = IsEthereumAddress; + exports.IsFQDN = IsFQDN; + exports.IsFirebasePushId = IsFirebasePushId; + exports.IsFullWidth = IsFullWidth; + exports.IsHSL = IsHSL; + exports.IsHalfWidth = IsHalfWidth; + exports.IsHash = IsHash; + exports.IsHexColor = IsHexColor; + exports.IsHexadecimal = IsHexadecimal; + exports.IsIBAN = IsIBAN; + exports.IsIP = IsIP; + exports.IsISBN = IsISBN; + exports.IsISIN = IsISIN; + exports.IsISO31661Alpha2 = IsISO31661Alpha2; + exports.IsISO31661Alpha3 = IsISO31661Alpha3; + exports.IsISO8601 = IsISO8601; + exports.IsISRC = IsISRC; + exports.IsISSN = IsISSN; + exports.IsIdentityCard = IsIdentityCard; + exports.IsIn = IsIn; + exports.IsInstance = IsInstance; + exports.IsInt = IsInt; + exports.IsJSON = IsJSON; + exports.IsJWT = IsJWT; + exports.IsLatLong = IsLatLong; + exports.IsLatitude = IsLatitude; + exports.IsLocale = IsLocale; + exports.IsLongitude = IsLongitude; + exports.IsLowercase = IsLowercase; + exports.IsMACAddress = IsMACAddress; + exports.IsMagnetURI = IsMagnetURI; + exports.IsMilitaryTime = IsMilitaryTime; + exports.IsMimeType = IsMimeType; + exports.IsMobilePhone = IsMobilePhone; + exports.IsMongoId = IsMongoId; + exports.IsMultibyte = IsMultibyte; + exports.IsNegative = IsNegative; + exports.IsNotEmpty = IsNotEmpty; + exports.IsNotEmptyObject = IsNotEmptyObject; + exports.IsNotIn = IsNotIn; + exports.IsNumber = IsNumber; + exports.IsNumberString = IsNumberString; + exports.IsObject = IsObject; + exports.IsOctal = IsOctal; + exports.IsOptional = IsOptional; + exports.IsPassportNumber = IsPassportNumber; + exports.IsPhoneNumber = IsPhoneNumber; + exports.IsPort = IsPort; + exports.IsPositive = IsPositive; + exports.IsPostalCode = IsPostalCode; + exports.IsRFC3339 = IsRFC3339; + exports.IsRgbColor = IsRgbColor; + exports.IsSemVer = IsSemVer; + exports.IsString = IsString; + exports.IsSurrogatePair = IsSurrogatePair; + exports.IsUUID = IsUUID; + exports.IsUppercase = IsUppercase; + exports.IsUrl = IsUrl; + exports.IsVariableWidth = IsVariableWidth; + exports.LENGTH = LENGTH; + exports.Length = Length; + exports.MATCHES = MATCHES; + exports.MAX = MAX; + exports.MAX_DATE = MAX_DATE; + exports.MAX_LENGTH = MAX_LENGTH; + exports.MIN = MIN; + exports.MIN_DATE = MIN_DATE; + exports.MIN_LENGTH = MIN_LENGTH; + exports.Matches = Matches; + exports.Max = Max; + exports.MaxDate = MaxDate; + exports.MaxLength = MaxLength; + exports.MetadataStorage = MetadataStorage; + exports.Min = Min; + exports.MinDate = MinDate; + exports.MinLength = MinLength; + exports.NOT_CONTAINS = NOT_CONTAINS; + exports.NOT_EQUALS = NOT_EQUALS; + exports.NotContains = NotContains; + exports.NotEquals = NotEquals; + exports.Validate = Validate; + exports.ValidateBy = ValidateBy; + exports.ValidateIf = ValidateIf; + exports.ValidateNested = ValidateNested; + exports.ValidatePromise = ValidatePromise; + exports.ValidationError = ValidationError; + exports.ValidationTypes = ValidationTypes; + exports.Validator = Validator; + exports.ValidatorConstraint = ValidatorConstraint; + exports.arrayContains = arrayContains; + exports.arrayMaxSize = arrayMaxSize; + exports.arrayMinSize = arrayMinSize; + exports.arrayNotContains = arrayNotContains; + exports.arrayNotEmpty = arrayNotEmpty; + exports.arrayUnique = arrayUnique; + exports.buildMessage = buildMessage; + exports.contains = contains; + exports.equals = equals; + exports.getFromContainer = getFromContainer; + exports.getMetadataStorage = getMetadataStorage; + exports.isAlpha = isAlpha; + exports.isAlphanumeric = isAlphanumeric; + exports.isArray = isArray; + exports.isAscii = isAscii; + exports.isBIC = isBIC; + exports.isBase32 = isBase32; + exports.isBase64 = isBase64; + exports.isBoolean = isBoolean; + exports.isBooleanString = isBooleanString; + exports.isBtcAddress = isBtcAddress; + exports.isByteLength = isByteLength; + exports.isCreditCard = isCreditCard; + exports.isCurrency = isCurrency; + exports.isDataURI = isDataURI; + exports.isDate = isDate; + exports.isDateString = isDateString; + exports.isDecimal = isDecimal; + exports.isDefined = isDefined; + exports.isDivisibleBy = isDivisibleBy; + exports.isEAN = isEAN; + exports.isEmail = isEmail; + exports.isEmpty = isEmpty; + exports.isEnum = isEnum; + exports.isEthereumAddress = isEthereumAddress; + exports.isFQDN = isFQDN; + exports.isFirebasePushId = isFirebasePushId; + exports.isFullWidth = isFullWidth; + exports.isHSL = isHSL; + exports.isHalfWidth = isHalfWidth; + exports.isHash = isHash; + exports.isHexColor = isHexColor; + exports.isHexadecimal = isHexadecimal; + exports.isIBAN = isIBAN; + exports.isIP = isIP; + exports.isISBN = isISBN; + exports.isISIN = isISIN; + exports.isISO31661Alpha2 = isISO31661Alpha2; + exports.isISO31661Alpha3 = isISO31661Alpha3; + exports.isISO8601 = isISO8601; + exports.isISRC = isISRC; + exports.isISSN = isISSN; + exports.isIdentityCard = isIdentityCard; + exports.isIn = isIn; + exports.isInstance = isInstance; + exports.isInt = isInt; + exports.isJSON = isJSON; + exports.isJWT = isJWT; + exports.isLatLong = isLatLong; + exports.isLatitude = isLatitude; + exports.isLocale = isLocale; + exports.isLongitude = isLongitude; + exports.isLowercase = isLowercase; + exports.isMACAddress = isMACAddress; + exports.isMagnetURI = isMagnetURI; + exports.isMilitaryTime = isMilitaryTime; + exports.isMimeType = isMimeType; + exports.isMobilePhone = isMobilePhone; + exports.isMongoId = isMongoId; + exports.isMultibyte = isMultibyte; + exports.isNegative = isNegative; + exports.isNotEmpty = isNotEmpty; + exports.isNotEmptyObject = isNotEmptyObject; + exports.isNotIn = isNotIn; + exports.isNumber = isNumber; + exports.isNumberString = isNumberString; + exports.isObject = isObject; + exports.isOctal = isOctal; + exports.isPassportNumber = isPassportNumber; + exports.isPhoneNumber = isPhoneNumber; + exports.isPort = isPort; + exports.isPositive = isPositive; + exports.isPostalCode = isPostalCode; + exports.isRFC3339 = isRFC3339; + exports.isRgbColor = isRgbColor; + exports.isSemVer = isSemVer; + exports.isString = isString; + exports.isSurrogatePair = isSurrogatePair; + exports.isURL = isURL; + exports.isUUID = isUUID; + exports.isUppercase = isUppercase; + exports.isValidationOptions = isValidationOptions; + exports.isVariableWidth = isVariableWidth; + exports.length = length; + exports.matches = matches; + exports.max = max; + exports.maxDate = maxDate; + exports.maxLength = maxLength; + exports.min = min; + exports.minDate = minDate; + exports.minLength = minLength; + exports.notContains = notContains; + exports.notEquals = notEquals; + exports.registerDecorator = registerDecorator; + exports.registerSchema = registerSchema; + exports.useContainer = useContainer; + exports.validate = validate; + exports.validateOrReject = validateOrReject; + exports.validateSync = validateSync; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=index.umd.js.map diff --git a/src/node_modules/class-validator/bundles/index.umd.js.map b/src/node_modules/class-validator/bundles/index.umd.js.map new file mode 100644 index 0000000..047cb88 --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.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/decorator/common/Allow.ts","../../src/metadata/ConstraintMetadata.ts","../../src/register-decorator.ts","../../src/decorator/common/ValidateBy.ts","../../src/decorator/common/IsDefined.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/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/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 { 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 {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 { 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 { 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 {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":["ValidatorJS","PhoneNumberUtil"],"mappings":";;;;;;;;IAGA;;;IAGA;;;;QAiEI,4BAAY,IAA4B;;;;YA1BxC,WAAM,GAAa,EAAE,CAAC;;;;YAKtB,WAAM,GAAY,KAAK,CAAC;;;;YAKxB,SAAI,GAAY,KAAK,CAAC;;;;YAKtB,YAAO,GAAS,SAAS,CAAC;YAYtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;YACpC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;YACxC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;YACxD,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;gBAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;gBAC5C,IAAI,CAAC,MAAM,GAA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SAAS,CAAC,CAAC,gBAAgB,CAAC,kBAA4B,EAAE,yBAA6C,CAAC,CAAC;SACpI;IACL,CAAC;IAgBD;;;;;AAKA,aAAgB,YAAY,CAAC,kBAAiC,EACjC,yBAAmD,EACnD,qBAAwC;QACjE,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;YACxC,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,kBAA4B,EAAE,yBAAmC,EAAE,qBAAqB,CAAC,CAAC;SAC7I;aAAM;YACH,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,kBAA4B,EAAE,yBAA6C,CAAC,CAAC;SAChI;IACL,CAAC;IAED;;;AAGA,aAAgB,cAAc,CAAC,MAAwB;QACnD,kBAAkB,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/src/node_modules/class-validator/bundles/index.umd.min.js b/src/node_modules/class-validator/bundles/index.umd.min.js new file mode 100644 index 0000000..8cea0e5 --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.umd.min.js @@ -0,0 +1,2 @@ +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("tslib"),require("validator"),require("google-libphonenumber")):"function"==typeof define&&define.amd?define(["exports","tslib","validator","google-libphonenumber"],n):n((t=t||self).ClassValidator={},t.tslib_1,t.validator,t.googleLibphonenumber)}(this,function(t,i,e,a){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var o=function(t){this.groups=[],this.always=!1,this.each=!1,this.context=void 0,this.type=t.type,this.target=t.target,this.propertyName=t.propertyName,this.constraints=t.constraints,this.constraintCls=t.constraintCls,this.validationTypeOptions=t.validationTypeOptions,t.validationOptions&&(this.message=t.validationOptions.message,this.groups=t.validationOptions.groups,this.always=t.validationOptions.always,this.each=t.validationOptions.each,this.context=t.validationOptions.context)},r=(n.prototype.transform=function(a){var i=[];return Object.keys(a.properties).forEach(function(e){a.properties[e].forEach(function(t){var n={message:t.message,groups:t.groups,always:t.always,each:t.each},r={type:t.type,target:a.name,propertyName:e,constraints:t.constraints,validationTypeOptions:t.options,validationOptions:n};i.push(new o(r))})}),i},n);function n(){}function s(){return"undefined"!=typeof window&&(window.global=window),global.classValidatorMetadataStorage||(global.classValidatorMetadataStorage=new u),global.classValidatorMetadataStorage}var u=(Object.defineProperty(c.prototype,"hasValidationMetaData",{get:function(){return!!this.validationMetadatas.length},enumerable:!0,configurable:!0}),c.prototype.addValidationSchema=function(t){var n=this;(new r).transform(t).forEach(function(t){return n.addValidationMetadata(t)})},c.prototype.addValidationMetadata=function(t){this.validationMetadatas.push(t)},c.prototype.addConstraintMetadata=function(t){this.constraintMetadatas.push(t)},c.prototype.groupByPropertyName=function(t){var n={};return t.forEach(function(t){n[t.propertyName]||(n[t.propertyName]=[]),n[t.propertyName].push(t)}),n},c.prototype.getTargetValidationMetadatas=function(n,r,e){var t=this.validationMetadatas.filter(function(t){return(t.target===n||t.target===r)&&(!!t.always||!(e&&0=n.getTime()}var ot="maxDate";function st(t,n){return t instanceof Date&&t.getTime()<=n.getTime()}var ut="contains";function ct(t,n){return"string"==typeof t&&e.contains(t,n)}var ft="notContains";function lt(t,n){return"string"==typeof t&&!e.contains(t,n)}var dt="isAlpha";function pt(t,n){return"string"==typeof t&&e.isAlpha(t,n)}var vt="isAlphanumeric";function mt(t,n){return"string"==typeof t&&e.isAlphanumeric(t,n)}var yt="isDecimal";function gt(t,n){return"string"==typeof t&&e.isDecimal(t,n)}var It="isAscii";function ht(t){return"string"==typeof t&&e.isAscii(t)}var St="isBase64";function Mt(t){return"string"==typeof t&&e.isBase64(t)}var bt="isByteLength";function At(t,n,r){return"string"==typeof t&&e.isByteLength(t,{min:n,max:r})}var Nt="isCreditCard";function Ot(t){return"string"==typeof t&&e.isCreditCard(t)}var Et="isCurrency";function _t(t,n){return"string"==typeof t&&e.isCurrency(t,n)}var $t="isEmail";function Tt(t,n){return"string"==typeof t&&e.isEmail(t,n)}function Ct(t,n){return"string"==typeof t&&e.isFQDN(t,n)}var Dt="isFullWidth";function Lt(t){return"string"==typeof t&&e.isFullWidth(t)}var Vt="isHalfWidth";function Rt(t){return"string"==typeof t&&e.isHalfWidth(t)}var Pt="isVariableWidth";function wt(t){return"string"==typeof t&&e.isVariableWidth(t)}var xt="isHexColor";function Bt(t){return"string"==typeof t&&e.isHexColor(t)}var Ut="isHexadecimal";function Ht(t){return"string"==typeof t&&e.isHexadecimal(t)}function jt(t){return!!t&&("each"in t||"message"in t||"groups"in t||"always"in t||"context"in t)}var Ft="isMacAddress";function Wt(t,n){return"string"==typeof t&&e.isMACAddress(t,n)}function qt(t,n){var r=n?""+n:void 0;return"string"==typeof t&&e.isIP(t,r)}function Yt(t){return"string"==typeof t&&e.isPort(t)}function kt(t,n){var r=n?""+n:void 0;return"string"==typeof t&&e.isISBN(t,r)}function Gt(t){return"string"==typeof t&&e.isISIN(t)}var Jt="isIso8601";function zt(t,n){return"string"==typeof t&&e.isISO8601(t,n)}function Qt(t){return"string"==typeof t&&e.isJSON(t)}function Xt(t){return"string"==typeof t&&e.isJWT(t)}var Zt="isLowercase";function Kt(t){return"string"==typeof t&&e.isLowercase(t)}var tn="isMobilePhone";function nn(t,n,r){return"string"==typeof t&&e.isMobilePhone(t,n,r)}var rn="isISO31661Alpha2";function en(t){return"string"==typeof t&&e.isISO31661Alpha2(t)}var an="isISO31661Alpha3";function on(t){return"string"==typeof t&&e.isISO31661Alpha3(t)}var sn="isMongoId";function un(t){return"string"==typeof t&&e.isMongoId(t)}var cn="isMultibyte";function fn(t){return"string"==typeof t&&e.isMultibyte(t)}var ln="isSurrogatePair";function dn(t){return"string"==typeof t&&e.isSurrogatePair(t)}function pn(t,n){return"string"==typeof t&&e.isURL(t,n)}function vn(t,n){return"string"==typeof t&&e.isUUID(t,n)}var mn="IsFirebasePushId";function yn(t){return"string"==typeof t&&20===t.length&&/^[a-zA-Z0-9_-]*$/.test(t)}var gn="isUppercase";function In(t){return"string"==typeof t&&e.isUppercase(t)}function hn(t,n,r){return"string"==typeof t&&e.isLength(t,{min:n,max:r})}var Sn="maxLength";function Mn(t,n){return"string"==typeof t&&e.isLength(t,{min:0,max:n})}var bn="minLength";function An(t,n){return"string"==typeof t&&e.isLength(t,{min:n})}var Nn="matches";function On(t,n,r){return"string"==typeof t&&e.matches(t,n,r)}var En="isPhoneNumber";function _n(t,n){var r=a.PhoneNumberUtil.getInstance();try{var e=r.parseAndKeepRawInput(t,n);return r.isValidNumber(e)}catch(t){return!1}}var $n="isMilitaryTime";function Tn(t){return"string"==typeof t&&e.matches(t,/^([01]\d|2[0-3]):?([0-5]\d)$/)}function Cn(t,n){return"string"==typeof t&&e.isHash(t,n)}function Dn(t,n){return"string"==typeof t&&e.isISSN(t,n)}var Ln="isDateString";function Vn(t){return"string"==typeof t&&/^\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.test(t)}var Rn="isBooleanString";function Pn(t){return"string"==typeof t&&e.isBoolean(t)}var wn="isNumberString";function xn(t,n){return"string"==typeof t&&e.isNumeric(t,n)}var Bn="isBase32";function Un(t){return"string"==typeof t&&e.isBase32(t)}function Hn(t){return"string"==typeof t&&e.isBIC(t)}var jn="isBtcAddress";function Fn(t){return"string"==typeof t&&e.isBtcAddress(t)}var Wn="isDataURI";function qn(t){return"string"==typeof t&&e.isDataURI(t)}function Yn(t){return"string"==typeof t&&e.isEAN(t)}var kn="isEthereumAddress";function Gn(t){return"string"==typeof t&&e.isEthereumAddress(t)}function Jn(t){return"string"==typeof t&&e.isHSL(t)}function zn(t){return"string"==typeof t&&e.isIBAN(t)}var Qn="isIdentityCard";function Xn(t,n){return"string"==typeof t&&e.isIdentityCard(t,n)}function Zn(t){return"string"==typeof t&&e.isISRC(t)}var Kn="isLocale";function tr(t){return"string"==typeof t&&e.isLocale(t)}var nr="isMagnetURI";function rr(t){return"string"==typeof t&&e.isMagnetURI(t)}var er="isMimeType";function ar(t){return"string"==typeof t&&e.isMimeType(t)}var ir="isOctal";function or(t){return"string"==typeof t&&e.isOctal(t)}var sr="isPassportNumber";function ur(t,n){return"string"==typeof t&&e.isPassportNumber(t,n)}var cr="isPostalCode";function fr(t,n){return"string"==typeof t&&e.isPostalCode(t,n)}var lr="isRFC3339";function dr(t){return"string"==typeof t&&e.isRFC3339(t)}var pr="isRgbColor";function vr(t,n){return"string"==typeof t&&e.isRgbColor(t,n)}var mr="isSemVer";function yr(t){return"string"==typeof t&&e.isSemVer(t)}var gr="isBoolean";function Ir(t){return t instanceof Boolean||"boolean"==typeof t}function hr(t){return t instanceof Date&&!isNaN(t.getTime())}var Sr="isNumber";function Mr(t,n){if(void 0===n&&(n={}),"number"!=typeof t)return!1;if(t===1/0||t===-1/0)return n.allowInfinity;if(Number.isNaN(t))return n.allowNaN;if(void 0!==n.maxDecimalPlaces){var r=0;if(t%1!=0&&(r=t.toString().split(".")[1].length),r>n.maxDecimalPlaces)return!1}return Number.isFinite(t)}function br(t,n){return 0<=Object.keys(n).map(function(t){return n[t]}).indexOf(t)}function Ar(t){return"number"==typeof t&&Number.isInteger(t)}var Nr="isString";function Or(t){return t instanceof String||"string"==typeof t}var Er="isArray";function _r(t){return t instanceof Array}var $r="isObject";function Tr(t){return null!=t&&("object"==typeof t||"function"==typeof t)&&!Array.isArray(t)}var Cr="arrayContains";function Dr(n,t){return n instanceof Array&&t.every(function(t){return-1!==n.indexOf(t)})}var Lr="arrayNotContains";function Vr(n,t){return n instanceof Array&&t.every(function(t){return-1===n.indexOf(t)})}var Rr="arrayNotEmpty";function Pr(t){return t instanceof Array&&0=n}var Br="arrayMaxSize";function Ur(t,n){return t instanceof Array&&t.length<=n}var Hr="arrayUnique";function jr(t){if(!(t instanceof Array))return!1;var n=t.filter(function(t,n,r){return r.indexOf(t)===n});return t.length===n.length}var Fr="isNotEmptyObject";function Wr(t){if(!Tr(t))return!1;for(var n in t)if(t.hasOwnProperty(n))return!0;return!1}var qr="isInstance";function Yr(t,n){return n&&"function"==typeof n&&t instanceof n}t.ARRAY_CONTAINS=Cr,t.ARRAY_MAX_SIZE=Br,t.ARRAY_MIN_SIZE=wr,t.ARRAY_NOT_CONTAINS=Lr,t.ARRAY_NOT_EMPTY=Rr,t.ARRAY_UNIQUE=Hr,t.Allow=function(e){return function(t,n){var r={type:d.WHITELIST,target:t.constructor,propertyName:n,validationOptions:e};s().addValidationMetadata(new o(r))}},t.ArrayContains=function(t,n){return C({name:Cr,constraints:[t],validator:{validate:function(t,n){return Dr(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must contain $constraint1 values"},n)}},n)},t.ArrayMaxSize=function(t,n){return C({name:Br,constraints:[t],validator:{validate:function(t,n){return Ur(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must contain not more than $constraint1 elements"},n)}},n)},t.ArrayMinSize=function(t,n){return C({name:wr,constraints:[t],validator:{validate:function(t,n){return xr(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must contain at least $constraint1 elements"},n)}},n)},t.ArrayNotContains=function(t,n){return C({name:Lr,constraints:[t],validator:{validate:function(t,n){return Vr(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property should not contain $constraint1 values"},n)}},n)},t.ArrayNotEmpty=function(t){return C({name:Rr,validator:{validate:function(t,n){return Pr(t)},defaultMessage:T(function(t){return t+"$property should not be empty"},t)}},t)},t.ArrayUnique=function(t){return C({name:Hr,validator:{validate:function(t,n){return jr(t)},defaultMessage:T(function(t){return t+"All $property's elements must be unique"},t)}},t)},t.CONTAINS=ut,t.Contains=function(t,n){return C({name:ut,constraints:[t],validator:{validate:function(t,n){return ct(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must contain a $constraint1 string"},n)}},n)},t.EQUALS=U,t.Equals=function(t,n){return C({name:U,constraints:[t],validator:{validate:function(t,n){return H(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be equal to $constraint1"},n)}},n)},t.IS_ALPHA=dt,t.IS_ALPHANUMERIC=vt,t.IS_ARRAY=Er,t.IS_ASCII=It,t.IS_BASE32=Bn,t.IS_BASE64=St,t.IS_BIC="isBIC",t.IS_BOOLEAN=gr,t.IS_BOOLEAN_STRING=Rn,t.IS_BTC_ADDRESS=jn,t.IS_BYTE_LENGTH=bt,t.IS_CREDIT_CARD=Nt,t.IS_CURRENCY=Et,t.IS_DATA_URI=Wn,t.IS_DATE="isDate",t.IS_DATE_STRING=Ln,t.IS_DECIMAL=yt,t.IS_DEFINED=D,t.IS_DIVISIBLE_BY=Q,t.IS_EAN="isEAN",t.IS_EMAIL=$t,t.IS_EMPTY=W,t.IS_ENUM="isEnum",t.IS_ETHEREUM_ADDRESS=kn,t.IS_FIREBASE_PUSH_ID=mn,t.IS_FQDN="isFqdn",t.IS_FULL_WIDTH=Dt,t.IS_HALF_WIDTH=Vt,t.IS_HASH="isHash",t.IS_HEXADECIMAL=Ut,t.IS_HEX_COLOR=xt,t.IS_HSL="isHSL",t.IS_IBAN="isIBAN",t.IS_IDENTITY_CARD=Qn,t.IS_IN="isIn",t.IS_INSTANCE=qr,t.IS_INT="isInt",t.IS_IP="isIp",t.IS_ISBN="isIsbn",t.IS_ISIN="isIsin",t.IS_ISO31661_ALPHA_2=rn,t.IS_ISO31661_ALPHA_3=an,t.IS_ISO8601=Jt,t.IS_ISRC="isISRC",t.IS_ISSN="isISSN",t.IS_JSON="isJson",t.IS_JWT="isJwt",t.IS_LATITUDE=P,t.IS_LATLONG=V,t.IS_LOCALE=Kn,t.IS_LONGITUDE=x,t.IS_LOWERCASE=Zt,t.IS_MAC_ADDRESS=Ft,t.IS_MAGNET_URI=nr,t.IS_MILITARY_TIME=$n,t.IS_MIME_TYPE=er,t.IS_MOBILE_PHONE=tn,t.IS_MONGO_ID=sn,t.IS_MULTIBYTE=cn,t.IS_NEGATIVE=tt,t.IS_NOT_EMPTY=Y,t.IS_NOT_EMPTY_OBJECT=Fr,t.IS_NOT_IN=J,t.IS_NUMBER=Sr,t.IS_NUMBER_STRING=wn,t.IS_OBJECT=$r,t.IS_OCTAL=ir,t.IS_PASSPORT_NUMBER=sr,t.IS_PHONE_NUMBER=En,t.IS_PORT="isPort",t.IS_POSITIVE=Z,t.IS_POSTAL_CODE=cr,t.IS_RFC_3339=lr,t.IS_RGB_COLOR=pr,t.IS_SEM_VER=mr,t.IS_STRING=Nr,t.IS_SURROGATE_PAIR=ln,t.IS_UPPERCASE=gn,t.IS_URL="isUrl",t.IS_UUID="isUuid",t.IS_VARIABLE_WIDTH=Pt,t.IsAlpha=function(t,n){return C({name:dt,constraints:[t],validator:{validate:function(t,n){return pt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must contain only letters (a-zA-Z)"},n)}},n)},t.IsAlphanumeric=function(t,n){return C({name:vt,constraints:[t],validator:{validate:function(t,n){return mt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must contain only letters and numbers"},n)}},n)},t.IsArray=function(t){return C({name:Er,validator:{validate:function(t,n){return _r(t)},defaultMessage:T(function(t){return t+"$property must be an array"},t)}},t)},t.IsAscii=function(t){return C({name:It,validator:{validate:function(t,n){return ht(t)},defaultMessage:T(function(t){return t+"$property must contain only ASCII characters"},t)}},t)},t.IsBIC=function(t){return C({name:"isBIC",validator:{validate:function(t,n){return Hn(t)},defaultMessage:T(function(t){return t+"$property must be a BIC or SWIFT code"},t)}},t)},t.IsBase32=function(t){return C({name:Bn,validator:{validate:function(t,n){return Un(t)},defaultMessage:T(function(t){return t+"$property must be base32 encoded"},t)}},t)},t.IsBase64=function(t){return C({name:St,validator:{validate:function(t,n){return Mt(t)},defaultMessage:T(function(t){return t+"$property must be base64 encoded"},t)}},t)},t.IsBoolean=function(t){return C({name:gr,validator:{validate:function(t,n){return Ir(t)},defaultMessage:T(function(t){return t+"$property must be a boolean value"},t)}},t)},t.IsBooleanString=function(t){return C({name:Rn,validator:{validate:function(t,n){return Pn(t)},defaultMessage:T(function(t){return t+"$property must be a boolean string"},t)}},t)},t.IsBtcAddress=function(t){return C({name:jn,validator:{validate:function(t,n){return Fn(t)},defaultMessage:T(function(t){return t+"$property must be a BTC address"},t)}},t)},t.IsByteLength=function(t,n,r){return C({name:bt,constraints:[t,n],validator:{validate:function(t,n){return At(t,n.constraints[0],n.constraints[1])},defaultMessage:T(function(t){return t+"$property's byte length must fall into ($constraint1, $constraint2) range"},r)}},r)},t.IsCreditCard=function(t){return C({name:Nt,validator:{validate:function(t,n){return Ot(t)},defaultMessage:T(function(t){return t+"$property must be a credit card"},t)}},t)},t.IsCurrency=function(t,n){return C({name:Et,constraints:[t],validator:{validate:function(t,n){return _t(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a currency"},n)}},n)},t.IsDataURI=function(t){return C({name:Wn,validator:{validate:function(t,n){return qn(t)},defaultMessage:T(function(t){return t+"$property must be a data uri format"},t)}},t)},t.IsDate=function(t){return C({name:"isDate",validator:{validate:function(t,n){return hr(t)},defaultMessage:T(function(t){return t+"$property must be a Date instance"},t)}},t)},t.IsDateString=function(t){return C({name:Ln,validator:{validate:function(t,n){return Vn(t)},defaultMessage:T(function(t){return t+"$property must be a ISOString"},t)}},t)},t.IsDecimal=function(t,n){return C({name:yt,constraints:[t],validator:{validate:function(t,n){return gt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property is not a valid decimal number."},n)}},n)},t.IsDefined=function(t){return C({name:D,validator:{validate:function(t){return L(t)},defaultMessage:T(function(t){return t+"$property should not be null or undefined"},t)}},t)},t.IsDivisibleBy=function(t,n){return C({name:Q,constraints:[t],validator:{validate:function(t,n){return X(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be divisible by $constraint1"},n)}},n)},t.IsEAN=function(t){return C({name:"isEAN",validator:{validate:function(t,n){return Yn(t)},defaultMessage:T(function(t){return t+"$property must be an EAN (European Article Number)"},t)}},t)},t.IsEmail=function(t,n){return C({name:$t,constraints:[t],validator:{validate:function(t,n){return Tt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be an email"},n)}},n)},t.IsEmpty=function(t){return C({name:W,validator:{validate:function(t,n){return q(t)},defaultMessage:T(function(t){return t+"$property must be empty"},t)}},t)},t.IsEnum=function(t,n){return C({name:"isEnum",constraints:[t],validator:{validate:function(t,n){return br(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a valid enum value"},n)}},n)},t.IsEthereumAddress=function(t){return C({name:kn,validator:{validate:function(t,n){return Gn(t)},defaultMessage:T(function(t){return t+"$property must be an Ethereum address"},t)}},t)},t.IsFQDN=function(t,n){return C({name:"isFqdn",constraints:[t],validator:{validate:function(t,n){return Ct(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a valid domain name"},n)}},n)},t.IsFirebasePushId=function(t){return C({name:mn,validator:{validate:function(t,n){return yn(t)},defaultMessage:T(function(t){return t+"$property must be a Firebase Push Id"},t)}},t)},t.IsFullWidth=function(t){return C({name:Dt,validator:{validate:function(t,n){return Lt(t)},defaultMessage:T(function(t){return t+"$property must contain a full-width characters"},t)}},t)},t.IsHSL=function(t){return C({name:"isHSL",validator:{validate:function(t,n){return Jn(t)},defaultMessage:T(function(t){return t+"$property must be a HSL color"},t)}},t)},t.IsHalfWidth=function(t){return C({name:Vt,validator:{validate:function(t,n){return Rt(t)},defaultMessage:T(function(t){return t+"$property must contain a half-width characters"},t)}},t)},t.IsHash=function(t,n){return C({name:"isHash",constraints:[t],validator:{validate:function(t,n){return Cn(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a hash of type $constraint1"},n)}},n)},t.IsHexColor=function(t){return C({name:xt,validator:{validate:function(t,n){return Bt(t)},defaultMessage:T(function(t){return t+"$property must be a hexadecimal color"},t)}},t)},t.IsHexadecimal=function(t){return C({name:Ut,validator:{validate:function(t,n){return Ht(t)},defaultMessage:T(function(t){return t+"$property must be a hexadecimal number"},t)}},t)},t.IsIBAN=function(t){return C({name:"isIBAN",validator:{validate:function(t,n){return zn(t)},defaultMessage:T(function(t){return t+"$property must be an IBAN"},t)}},t)},t.IsIP=function(t,n){return C({name:"isIp",constraints:[t],validator:{validate:function(t,n){return qt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be an ip address"},n)}},n)},t.IsISBN=function(t,n){return C({name:"isIsbn",constraints:[t],validator:{validate:function(t,n){return kt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be an ISBN"},n)}},n)},t.IsISIN=function(t){return C({name:"isIsin",validator:{validate:function(t,n){return Gt(t)},defaultMessage:T(function(t){return t+"$property must be an ISIN (stock/security identifier)"},t)}},t)},t.IsISO31661Alpha2=function(t){return C({name:rn,validator:{validate:function(t,n){return en(t)},defaultMessage:T(function(t){return t+"$property must be a valid ISO31661 Alpha2 code"},t)}},t)},t.IsISO31661Alpha3=function(t){return C({name:an,validator:{validate:function(t,n){return on(t)},defaultMessage:T(function(t){return t+"$property must be a valid ISO31661 Alpha3 code"},t)}},t)},t.IsISO8601=function(t,n){return C({name:Jt,constraints:[t],validator:{validate:function(t,n){return zt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a valid ISO 8601 date string"},n)}},n)},t.IsISRC=function(t){return C({name:"isISRC",validator:{validate:function(t,n){return Zn(t)},defaultMessage:T(function(t){return t+"$property must be an ISRC"},t)}},t)},t.IsISSN=function(t,n){return C({name:"isISSN",constraints:[t],validator:{validate:function(t,n){return Dn(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a ISSN"},n)}},n)},t.IsIdentityCard=function(t,n){return C({name:Qn,constraints:[t],validator:{validate:function(t,n){return Xn(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a identity card number"},n)}},n)},t.IsIn=function(t,n){return C({name:"isIn",constraints:[t],validator:{validate:function(t,n){return G(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be one of the following values: $constraint1"},n)}},n)},t.IsInstance=function(t,n){return C({name:qr,constraints:[t],validator:{validate:function(t,n){return Yr(t,n.constraints[0])},defaultMessage:T(function(t,n){return n.constraints[0]?t+("$property must be an instance of "+n.constraints[0].name):t+qr+" decorator expects and object as value, but got falsy value."},n)}},n)},t.IsInt=function(t){return C({name:"isInt",validator:{validate:function(t,n){return Ar(t)},defaultMessage:T(function(t){return t+"$property must be an integer number"},t)}},t)},t.IsJSON=function(t){return C({name:"isJson",validator:{validate:function(t,n){return Qt(t)},defaultMessage:T(function(t){return t+"$property must be a json string"},t)}},t)},t.IsJWT=function(t){return C({name:"isJwt",validator:{validate:function(t,n){return Xt(t)},defaultMessage:T(function(t){return t+"$property must be a jwt string"},t)}},t)},t.IsLatLong=function(t){return C({name:V,validator:{validate:function(t,n){return R(t)},defaultMessage:T(function(t){return t+"$property must be a latitude,longitude string"},t)}},t)},t.IsLatitude=function(t){return C({name:P,validator:{validate:function(t,n){return w(t)},defaultMessage:T(function(t){return t+"$property must be a latitude string or number"},t)}},t)},t.IsLocale=function(t){return C({name:Kn,validator:{validate:function(t,n){return tr(t)},defaultMessage:T(function(t){return t+"$property must be locale"},t)}},t)},t.IsLongitude=function(t){return C({name:x,validator:{validate:function(t,n){return B(t)},defaultMessage:T(function(t){return t+"$property must be a longitude string or number"},t)}},t)},t.IsLowercase=function(t){return C({name:Zt,validator:{validate:function(t,n){return Kt(t)},defaultMessage:T(function(t){return t+"$property must be a lowercase string"},t)}},t)},t.IsMACAddress=function(t,n){var r=jt(t)?void 0:t,e=jt(t)?t:n;return C({name:Ft,constraints:[r],validator:{validate:function(t,n){return Wt(t,r)},defaultMessage:T(function(t){return t+"$property must be a MAC Address"},e)}},e)},t.IsMagnetURI=function(t){return C({name:nr,validator:{validate:function(t,n){return rr(t)},defaultMessage:T(function(t){return t+"$property must be magnet uri format"},t)}},t)},t.IsMilitaryTime=function(t){return C({name:$n,validator:{validate:function(t,n){return Tn(t)},defaultMessage:T(function(t){return t+"$property must be a valid representation of military time in the format HH:MM"},t)}},t)},t.IsMimeType=function(t){return C({name:er,validator:{validate:function(t,n){return ar(t)},defaultMessage:T(function(t){return t+"$property must be MIME type format"},t)}},t)},t.IsMobilePhone=function(t,n,r){return C({name:tn,constraints:[t,n],validator:{validate:function(t,n){return nn(t,n.constraints[0],n.constraints[1])},defaultMessage:T(function(t){return t+"$property must be a phone number"},r)}},r)},t.IsMongoId=function(t){return C({name:sn,validator:{validate:function(t,n){return un(t)},defaultMessage:T(function(t){return t+"$property must be a mongodb id"},t)}},t)},t.IsMultibyte=function(t){return C({name:cn,validator:{validate:function(t,n){return fn(t)},defaultMessage:T(function(t){return t+"$property must contain one or more multibyte chars"},t)}},t)},t.IsNegative=function(t){return C({name:tt,validator:{validate:function(t,n){return nt(t)},defaultMessage:T(function(t){return t+"$property must be a negative number"},t)}},t)},t.IsNotEmpty=function(t){return C({name:Y,validator:{validate:function(t,n){return k(t)},defaultMessage:T(function(t){return t+"$property should not be empty"},t)}},t)},t.IsNotEmptyObject=function(t){return C({name:Fr,validator:{validate:function(t,n){return Wr(t)},defaultMessage:T(function(t){return t+"$property must be a non-empty object"},t)}},t)},t.IsNotIn=function(t,n){return C({name:J,constraints:[t],validator:{validate:function(t,n){return z(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property should not be one of the following values: $constraint1"},n)}},n)},t.IsNumber=function(t,n){return void 0===t&&(t={}),C({name:Sr,constraints:[t],validator:{validate:function(t,n){return Mr(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a number conforming to the specified constraints"},n)}},n)},t.IsNumberString=function(t,n){return C({name:wn,constraints:[t],validator:{validate:function(t,n){return xn(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a number string"},n)}},n)},t.IsObject=function(t){return C({name:$r,validator:{validate:function(t,n){return Tr(t)},defaultMessage:T(function(t){return t+"$property must be an object"},t)}},t)},t.IsOctal=function(t){return C({name:ir,validator:{validate:function(t,n){return or(t)},defaultMessage:T(function(t){return t+"$property must be valid octal number"},t)}},t)},t.IsOptional=function(e){return function(t,r){var n={type:d.CONDITIONAL_VALIDATION,target:t.constructor,propertyName:r,constraints:[function(t,n){return null!==t[r]&&void 0!==t[r]}],validationOptions:e};s().addValidationMetadata(new o(n))}},t.IsPassportNumber=function(t,n){return C({name:sr,constraints:[t],validator:{validate:function(t,n){return ur(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be valid passport number"},n)}},n)},t.IsPhoneNumber=function(t,n){return C({name:En,constraints:[t],validator:{validate:function(t,n){return _n(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a valid phone number"},n)}},n)},t.IsPort=function(t){return C({name:"isPort",validator:{validate:function(t,n){return Yt(t)},defaultMessage:T(function(t){return t+"$property must be a port"},t)}},t)},t.IsPositive=function(t){return C({name:Z,validator:{validate:function(t,n){return K(t)},defaultMessage:T(function(t){return t+"$property must be a positive number"},t)}},t)},t.IsPostalCode=function(t,n){return C({name:cr,constraints:[t],validator:{validate:function(t,n){return fr(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be a postal code"},n)}},n)},t.IsRFC3339=function(t){return C({name:lr,validator:{validate:function(t,n){return dr(t)},defaultMessage:T(function(t){return t+"$property must be RFC 3339 date"},t)}},t)},t.IsRgbColor=function(t,n){return C({name:pr,constraints:[t],validator:{validate:function(t,n){return vr(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be RGB color"},n)}},n)},t.IsSemVer=function(t){return C({name:mr,validator:{validate:function(t,n){return yr(t)},defaultMessage:T(function(t){return t+"$property must be a Semantic Versioning Specification"},t)}},t)},t.IsString=function(t){return C({name:Nr,validator:{validate:function(t,n){return Or(t)},defaultMessage:T(function(t){return t+"$property must be a string"},t)}},t)},t.IsSurrogatePair=function(t){return C({name:ln,validator:{validate:function(t,n){return dn(t)},defaultMessage:T(function(t){return t+"$property must contain any surrogate pairs chars"},t)}},t)},t.IsUUID=function(t,n){return C({name:"isUuid",constraints:[t],validator:{validate:function(t,n){return vn(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be an UUID"},n)}},n)},t.IsUppercase=function(t){return C({name:gn,validator:{validate:function(t,n){return In(t)},defaultMessage:T(function(t){return t+"$property must be uppercase"},t)}},t)},t.IsUrl=function(t,n){return C({name:"isUrl",constraints:[t],validator:{validate:function(t,n){return pn(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be an URL address"},n)}},n)},t.IsVariableWidth=function(t){return C({name:Pt,validator:{validate:function(t,n){return wt(t)},defaultMessage:T(function(t){return t+"$property must contain a full-width and half-width characters"},t)}},t)},t.LENGTH="length",t.Length=function(t,n,r){return C({name:"length",constraints:[t,n],validator:{validate:function(t,n){return hn(t,n.constraints[0],n.constraints[1])},defaultMessage:T(function(t,n){var r=null!==n.constraints[0]&&void 0!==n.constraints[0],e=null!==n.constraints[1]&&void 0!==n.constraints[1];return r&&(!n.value||n.value.lengthn.constraints[1]?t+"$property must be shorter than or equal to $constraint2 characters":t+"$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"},r)}},r)},t.MATCHES=Nn,t.MAX="max",t.MAX_DATE=ot,t.MAX_LENGTH=Sn,t.MIN="min",t.MIN_DATE=at,t.MIN_LENGTH=bn,t.Matches=function(t,n,r){var e;return n&&n instanceof Object&&!r?r=n:e=n,C({name:Nn,constraints:[t,e],validator:{validate:function(t,n){return On(t,n.constraints[0],n.constraints[0])},defaultMessage:T(function(t,n){return t+"$property must match $constraint1 regular expression"},r)}},r)},t.Max=function(t,n){return C({name:"max",constraints:[t],validator:{validate:function(t,n){return rt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must not be greater than $constraint1"},n)}},n)},t.MaxDate=function(t,n){return C({name:ot,constraints:[t],validator:{validate:function(t,n){return st(t,n.constraints[0])},defaultMessage:T(function(t){return"maximal allowed date for "+t+"$property is $constraint1"},n)}},n)},t.MaxLength=function(t,n){return C({name:Sn,constraints:[t],validator:{validate:function(t,n){return Mn(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be shorter than or equal to $constraint1 characters"},n)}},n)},t.MetadataStorage=u,t.Min=function(t,n){return C({name:"min",constraints:[t],validator:{validate:function(t,n){return et(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must not be less than $constraint1"},n)}},n)},t.MinDate=function(t,n){return C({name:at,constraints:[t],validator:{validate:function(t,n){return it(t,n.constraints[0])},defaultMessage:T(function(t){return"minimal allowed date for "+t+"$property is $constraint1"},n)}},n)},t.MinLength=function(t,n){return C({name:bn,constraints:[t],validator:{validate:function(t,n){return An(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property must be longer than or equal to $constraint1 characters"},n)}},n)},t.NOT_CONTAINS=ft,t.NOT_EQUALS=j,t.NotContains=function(t,n){return C({name:ft,constraints:[t],validator:{validate:function(t,n){return lt(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property should not contain a $constraint1 string"},n)}},n)},t.NotEquals=function(t,n){return C({name:j,constraints:[t],validator:{validate:function(t,n){return F(t,n.constraints[0])},defaultMessage:T(function(t){return t+"$property should not be equal to $constraint1"},n)}},n)},t.Validate=function(e,a,i){return function(t,n){var r={type:d.CUSTOM_VALIDATION,target:t.constructor,propertyName:n,constraintCls:e,constraints:a instanceof Array?a:void 0,validationOptions:a instanceof Array?i:a};s().addValidationMetadata(new o(r))}},t.ValidateBy=C,t.ValidateIf=function(e,a){return function(t,n){var r={type:d.CONDITIONAL_VALIDATION,target:t.constructor,propertyName:n,constraints:[e],validationOptions:a};s().addValidationMetadata(new o(r))}},t.ValidateNested=function(t){var e=i.__assign({},t),n=e.each?"each value in ":"";return e.message=e.message||n+"nested property $property must be either object or array",function(t,n){var r={type:d.NESTED_VALIDATION,target:t.constructor,propertyName:n,validationOptions:e};s().addValidationMetadata(new o(r))}},t.ValidatePromise=function(e){return function(t,n){var r={type:d.PROMISE_VALIDATION,target:t.constructor,propertyName:n,validationOptions:e};s().addValidationMetadata(new o(r))}},t.ValidationError=l,t.ValidationTypes=d,t.Validator=h,t.ValidatorConstraint=function(a){return function(t){var n=!(!a||!a.async),r=a&&a.name?a.name:"";r=r||((r=t.name)||r.replace(/\.?([A-Z]+)/g,function(t,n){return"_"+n.toLowerCase()}).replace(/^_/,""));var e=new E(t,r,n);s().addConstraintMetadata(e)}},t.arrayContains=Dr,t.arrayMaxSize=Ur,t.arrayMinSize=xr,t.arrayNotContains=Vr,t.arrayNotEmpty=Pr,t.arrayUnique=jr,t.buildMessage=T,t.contains=ct,t.equals=H,t.getFromContainer=O,t.getMetadataStorage=s,t.isAlpha=pt,t.isAlphanumeric=mt,t.isArray=_r,t.isAscii=ht,t.isBIC=Hn,t.isBase32=Un,t.isBase64=Mt,t.isBoolean=Ir,t.isBooleanString=Pn,t.isBtcAddress=Fn,t.isByteLength=At,t.isCreditCard=Ot,t.isCurrency=_t,t.isDataURI=qn,t.isDate=hr,t.isDateString=Vn,t.isDecimal=gt,t.isDefined=L,t.isDivisibleBy=X,t.isEAN=Yn,t.isEmail=Tt,t.isEmpty=q,t.isEnum=br,t.isEthereumAddress=Gn,t.isFQDN=Ct,t.isFirebasePushId=yn,t.isFullWidth=Lt,t.isHSL=Jn,t.isHalfWidth=Rt,t.isHash=Cn,t.isHexColor=Bt,t.isHexadecimal=Ht,t.isIBAN=zn,t.isIP=qt,t.isISBN=kt,t.isISIN=Gt,t.isISO31661Alpha2=en,t.isISO31661Alpha3=on,t.isISO8601=zt,t.isISRC=Zn,t.isISSN=Dn,t.isIdentityCard=Xn,t.isIn=G,t.isInstance=Yr,t.isInt=Ar,t.isJSON=Qt,t.isJWT=Xt,t.isLatLong=R,t.isLatitude=w,t.isLocale=tr,t.isLongitude=B,t.isLowercase=Kt,t.isMACAddress=Wt,t.isMagnetURI=rr,t.isMilitaryTime=Tn,t.isMimeType=ar,t.isMobilePhone=nn,t.isMongoId=un,t.isMultibyte=fn,t.isNegative=nt,t.isNotEmpty=k,t.isNotEmptyObject=Wr,t.isNotIn=z,t.isNumber=Mr,t.isNumberString=xn,t.isObject=Tr,t.isOctal=or,t.isPassportNumber=ur,t.isPhoneNumber=_n,t.isPort=Yt,t.isPositive=K,t.isPostalCode=fr,t.isRFC3339=dr,t.isRgbColor=vr,t.isSemVer=yr,t.isString=Or,t.isSurrogatePair=dn,t.isURL=pn,t.isUUID=vn,t.isUppercase=In,t.isValidationOptions=jt,t.isVariableWidth=wt,t.length=hn,t.matches=On,t.max=rt,t.maxDate=st,t.maxLength=Mn,t.min=et,t.minDate=it,t.minLength=An,t.notContains=lt,t.notEquals=F,t.registerDecorator=$,t.registerSchema=function(t){s().addValidationSchema(t)},t.useContainer=function(t,n){M=t,b=n},t.validate=function(t,n,r){return"string"==typeof t?O(h).validate(t,n,r):O(h).validate(t,n)},t.validateOrReject=function(t,n,r){return"string"==typeof t?O(h).validateOrReject(t,n,r):O(h).validateOrReject(t,n)},t.validateSync=function(t,n,r){return"string"==typeof t?O(h).validateSync(t,n,r):O(h).validateSync(t,n)},Object.defineProperty(t,"__esModule",{value:!0})}); +//# sourceMappingURL=index.umd.min.js.map diff --git a/src/node_modules/class-validator/bundles/index.umd.min.js.map b/src/node_modules/class-validator/bundles/index.umd.min.js.map new file mode 100644 index 0000000..2a8dcd7 --- /dev/null +++ b/src/node_modules/class-validator/bundles/index.umd.min.js.map @@ -0,0 +1 @@ +{"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,KAAMoB,EAAWpB,KACjBC,OAAQY,EAAOQ,KACfnB,aAAciB,EACdhB,YAAaiB,EAAWjB,YACxBE,sBAAuBe,EAAWE,QAClChB,kBAAmBA,GAEvBQ,EAAUS,K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,GACrEuJ,EAAgBiQ,EAChBhQ,EAAuBxJ,uB8GFFyZ,EACAvQ,EACAC,GACrB,MAAkC,iBAAvBsQ,EACA5P,EAAiBb,GAAWxB,SAASiS,EAA8BvQ,EAAqCC,GAExGU,EAAiBb,GAAWxB,SAASiS,EAA8BvQ,gCAiBjDuQ,EACRvQ,EACAC,GACrB,MAAkC,iBAAvBsQ,EACA5P,EAAiBb,GAAW0Q,iBAAiBD,EAA8BvQ,EAAqCC,GAEhHU,EAAiBb,GAAW0Q,iBAAiBD,EAA8BvQ,4BAuB7DuQ,EACAvQ,EACAC,GACzB,MAAkC,iBAAvBsQ,EACA5P,EAAiBb,GAAW2Q,aAAaF,EAA8BvQ,EAAqCC,GAE5GU,EAAiBb,GAAW2Q,aAAaF,EAA8BvQ"} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/container.js b/src/node_modules/class-validator/esm2015/container.js new file mode 100644 index 0000000..6e93b02 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/container.js @@ -0,0 +1,47 @@ +/** + * Container to be used by this library for inversion control. If container was not implicitly set then by default + * container simply creates a new instance of the given class. + */ +const defaultContainer = new (class { + constructor() { + this.instances = []; + } + get(someClass) { + let instance = this.instances.find(instance => instance.type === someClass); + if (!instance) { + instance = { type: someClass, object: new someClass() }; + this.instances.push(instance); + } + return instance.object; + } +})(); +let userContainer; +let userContainerOptions; +/** + * Sets container to be used by this library. + */ +export function useContainer(iocContainer, options) { + userContainer = iocContainer; + userContainerOptions = options; +} +/** + * Gets the IOC container used by this library. + */ +export function getFromContainer(someClass) { + if (userContainer) { + try { + const instance = userContainer.get(someClass); + if (instance) + return instance; + if (!userContainerOptions || !userContainerOptions.fallback) + return instance; + } + catch (error) { + if (!userContainerOptions || !userContainerOptions.fallbackOnErrors) + throw error; + } + } + return defaultContainer.get(someClass); +} + +//# sourceMappingURL=container.js.map diff --git a/src/node_modules/class-validator/esm2015/container.js.map b/src/node_modules/class-validator/esm2015/container.js.map new file mode 100644 index 0000000..d32958e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/container.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/container.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,MAAM,gBAAgB,GAAmE,IAAI,CAAC;IAAA;QAClF,cAAS,GAAsC,EAAE,CAAC;IAU9D,CAAC;IATG,GAAG,CAAI,SAAsC;QACzC,IAAI,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;QAC5E,IAAI,CAAC,QAAQ,EAAE;YACX,QAAQ,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC;YACxD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACjC;QAED,OAAO,QAAQ,CAAC,MAAM,CAAC;IAC3B,CAAC;CACJ,CAAC,EAAE,CAAC;AAEL,IAAI,aAA6E,CAAC;AAClF,IAAI,oBAAyC,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,YAA0C,EAAE,OAA6B;IAClG,aAAa,GAAG,YAAY,CAAC;IAC7B,oBAAoB,GAAG,OAAO,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAI,SAA+C;IAC/E,IAAI,aAAa,EAAE;QACf,IAAI;YACA,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC9C,IAAI,QAAQ;gBACR,OAAO,QAAQ,CAAC;YAEpB,IAAI,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,CAAC,QAAQ;gBACvD,OAAO,QAAQ,CAAC;SAEvB;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,CAAC,gBAAgB;gBAC/D,MAAM,KAAK,CAAC;SACnB;KACJ;IACD,OAAO,gBAAgB,CAAC,GAAG,CAAI,SAAS,CAAC,CAAC;AAC9C,CAAC","file":"container.js","sourcesContent":["\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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js b/src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js new file mode 100644 index 0000000..ff10000 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js @@ -0,0 +1,12 @@ +export function isValidationOptions(val) { + if (!val) { + return false; + } + return "each" in val + || "message" in val + || "groups" in val + || "always" in val + || "context" in val; +} + +//# sourceMappingURL=ValidationOptions.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js.map b/src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js.map new file mode 100644 index 0000000..c6982da --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/ValidationOptions.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/ValidationOptions.ts"],"names":[],"mappings":"AAmCA,MAAM,UAAU,mBAAmB,CAAC,GAAQ;IACxC,IAAI,CAAC,GAAG,EAAE;QACN,OAAO,KAAK,CAAC;KAChB;IACD,OAAO,MAAM,IAAI,GAAG;WACb,SAAS,IAAI,GAAG;WAChB,QAAQ,IAAI,GAAG;WACf,QAAQ,IAAI,GAAG;WACf,SAAS,IAAI,GAAG,CAAC;AAC5B,CAAC","file":"ValidationOptions.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js b/src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js new file mode 100644 index 0000000..ed7da34 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const ARRAY_CONTAINS = "arrayContains"; +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +export function arrayContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(value => array.indexOf(value) !== -1); +} +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +export function ArrayContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_CONTAINS, + constraints: [values], + validator: { + validate: (value, args) => arrayContains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain $constraint1 values", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayContains.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js.map b/src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js.map new file mode 100644 index 0000000..ca8aa49 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayContains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayContains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,MAAa;IACvD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IAEjB,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,MAAa,EAAE,iBAAqC;IAC9E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACpE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,4CAA4C,EACzE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayContains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js new file mode 100644 index 0000000..096fe48 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const ARRAY_MAX_SIZE = "arrayMaxSize"; +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +export function arrayMaxSize(array, max) { + return array instanceof Array && array.length <= max; +} +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +export function ArrayMaxSize(max, validationOptions) { + return ValidateBy({ + name: ARRAY_MAX_SIZE, + constraints: [max], + validator: { + validate: (value, args) => arrayMaxSize(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain not more than $constraint1 elements", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayMaxSize.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js.map b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js.map new file mode 100644 index 0000000..2d82792 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMaxSize.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayMaxSize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,GAAW;IACpD,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACnE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,4DAA4D,EACzF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayMaxSize.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js new file mode 100644 index 0000000..52b6681 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const ARRAY_MIN_SIZE = "arrayMinSize"; +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +export function arrayMinSize(array, min) { + return array instanceof Array && array.length >= min; +} +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +export function ArrayMinSize(min, validationOptions) { + return ValidateBy({ + name: ARRAY_MIN_SIZE, + constraints: [min], + validator: { + validate: (value, args) => arrayMinSize(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain at least $constraint1 elements", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayMinSize.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js.map b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js.map new file mode 100644 index 0000000..7c071d6 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayMinSize.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayMinSize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,GAAW;IACpD,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACnE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,uDAAuD,EACpF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayMinSize.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js new file mode 100644 index 0000000..86e2369 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const ARRAY_NOT_CONTAINS = "arrayNotContains"; +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +export function arrayNotContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(value => array.indexOf(value) === -1); +} +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +export function ArrayNotContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_CONTAINS, + constraints: [values], + validator: { + validate: (value, args) => arrayNotContains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not contain $constraint1 values", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayNotContains.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js.map b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js.map new file mode 100644 index 0000000..6602fce --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotContains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayNotContains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,MAAa;IAC1D,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IAEjB,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAa,EAAE,iBAAqC;IACjF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACvE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,kDAAkD,EAC/E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayNotContains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js new file mode 100644 index 0000000..9697f5b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js @@ -0,0 +1,24 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const ARRAY_NOT_EMPTY = "arrayNotEmpty"; +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +export function arrayNotEmpty(array) { + return array instanceof Array && array.length > 0; +} +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +export function ArrayNotEmpty(validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_EMPTY, + validator: { + validate: (value, args) => arrayNotEmpty(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be empty", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayNotEmpty.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js.map b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js.map new file mode 100644 index 0000000..212e058 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayNotEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayNotEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IACxC,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACtD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,iBAAqC;IAC/D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;YAC/C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+BAA+B,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayNotEmpty.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js b/src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js new file mode 100644 index 0000000..c565b5f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const ARRAY_UNIQUE = "arrayUnique"; +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +export function arrayUnique(array) { + if (!(array instanceof Array)) + return false; + const uniqueItems = array.filter((a, b, c) => c.indexOf(a) === b); + return array.length === uniqueItems.length; +} +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +export function ArrayUnique(validationOptions) { + return ValidateBy({ + name: ARRAY_UNIQUE, + validator: { + validate: (value, args) => arrayUnique(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "All $property's elements must be unique", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayUnique.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js.map b/src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js.map new file mode 100644 index 0000000..ffd4fcb --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/array/ArrayUnique.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayUnique.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IAEjB,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAClE,OAAO,KAAK,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,yCAAyC,EACtE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayUnique.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/Allow.js b/src/node_modules/class-validator/esm2015/decorator/common/Allow.js new file mode 100644 index 0000000..9a93f73 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/Allow.js @@ -0,0 +1,19 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * If object has both allowed and not allowed properties a validation error will be thrown. + */ +export function Allow(validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.WHITELIST, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=Allow.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/Allow.js.map b/src/node_modules/class-validator/esm2015/decorator/common/Allow.js.map new file mode 100644 index 0000000..962787d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/Allow.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/Allow.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,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,MAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,SAAS;YAC/B,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"Allow.js","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 * 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/Equals.js b/src/node_modules/class-validator/esm2015/decorator/common/Equals.js new file mode 100644 index 0000000..18db0e2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/Equals.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const EQUALS = "equals"; +/** + * Checks if value matches ("===") the comparison. + */ +export function equals(value, comparison) { + return value === comparison; +} +/** + * Checks if value matches ("===") the comparison. + */ +export function Equals(comparison, validationOptions) { + return ValidateBy({ + name: EQUALS, + constraints: [comparison], + validator: { + validate: (value, args) => equals(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be equal to $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Equals.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/Equals.js.map b/src/node_modules/class-validator/esm2015/decorator/common/Equals.js.map new file mode 100644 index 0000000..10f26b5 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/Equals.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/Equals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;AAE/B;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,UAAmB;IACtD,OAAO,KAAK,KAAK,UAAU,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,UAAe,EAAE,iBAAqC;IACzE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,yCAAyC,EACtE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Equals.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js b/src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js new file mode 100644 index 0000000..3fd0eb4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js @@ -0,0 +1,24 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import { ValidationTypes } from "../../validation/ValidationTypes"; +// isDefined is (yet) a special case +export const IS_DEFINED = ValidationTypes.IS_DEFINED; +/** + * Checks if value is defined (!== undefined, !== null). + */ +export function isDefined(value) { + return value !== undefined && value !== null; +} +/** + * Checks if value is defined (!== undefined, !== null). + */ +export function IsDefined(validationOptions) { + return ValidateBy({ + name: IS_DEFINED, + validator: { + validate: (value) => isDefined(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be null or undefined", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDefined.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js.map new file mode 100644 index 0000000..b091e42 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsDefined.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsDefined.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,oCAAoC;AACpC,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAU;IAChC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;YACrC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,2CAA2C,EACxE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDefined.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js b/src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js new file mode 100644 index 0000000..e1b35a6 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_EMPTY = "isEmpty"; +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +export function isEmpty(value) { + return value === "" || value === null || value === undefined; +} +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +export function IsEmpty(validationOptions) { + return ValidateBy({ + name: IS_EMPTY, + validator: { + validate: (value, args) => isEmpty(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be empty", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEmpty.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js.map new file mode 100644 index 0000000..19ab5ba --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;YACzC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,yBAAyB,EACtD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEmpty.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsIn.js b/src/node_modules/class-validator/esm2015/decorator/common/IsIn.js new file mode 100644 index 0000000..16fe57a --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsIn.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_IN = "isIn"; +/** + * Checks if given value is in a array of allowed values. + */ +export function isIn(value, possibleValues) { + return !(possibleValues instanceof Array) || possibleValues.some(possibleValue => possibleValue === value); +} +/** + * Checks if given value is in a array of allowed values. + */ +export function IsIn(values, validationOptions) { + return ValidateBy({ + name: IS_IN, + constraints: [values], + validator: { + validate: (value, args) => isIn(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be one of the following values: $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIn.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsIn.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsIn.js.map new file mode 100644 index 0000000..cc3c0c2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsIn.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsIn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC;AAE5B;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,KAAc,EAAE,cAAyB;IAC1D,OAAO,CAAC,CAAC,cAAc,YAAY,KAAK,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,KAAK,KAAK,CAAC,CAAC;AAC/G,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,MAAa,EAAE,iBAAqC;IACrE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC3D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,6DAA6D,EAC1F,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIn.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js b/src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js new file mode 100644 index 0000000..5c1a9dc --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import validator from "validator"; +export const IS_LATLONG = "isLatLong"; +/** + * Checks if a value is string in format a "latitude,longitude". + */ +export function isLatLong(value) { + return typeof value === "string" && validator.isLatLong(value); +} +/** + * Checks if a value is string in format a "latitude,longitude". + */ +export function IsLatLong(validationOptions) { + return ValidateBy({ + name: IS_LATLONG, + validator: { + validate: (value, args) => isLatLong(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a latitude,longitude string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLatLong.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js.map new file mode 100644 index 0000000..965a912 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsLatLong.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsLatLong.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;YAC3C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+CAA+C,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLatLong.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js b/src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js new file mode 100644 index 0000000..aab9ff0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import { isLatLong } from "./IsLatLong"; +export const IS_LATITUDE = "isLatitude"; +/** + * Checks if a given value is a latitude. + */ +export function isLatitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong(`${value},0`); +} +/** + * Checks if a given value is a latitude. + */ +export function IsLatitude(validationOptions) { + return ValidateBy({ + name: IS_LATITUDE, + validator: { + validate: (value, args) => isLatitude(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a latitude string or number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLatitude.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js.map new file mode 100644 index 0000000..2e04e84 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsLatitude.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsLatitude.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACpC,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,IAAI,SAAS,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;YAC5C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+CAA+C,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLatitude.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js b/src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js new file mode 100644 index 0000000..e14d8a4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import { isLatLong } from "./IsLatLong"; +export const IS_LONGITUDE = "isLongitude"; +/** + * Checks if a given value is a longitude. + */ +export function isLongitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong(`0,${value}`); +} +/** + * Checks if a given value is a longitude. + */ +export function IsLongitude(validationOptions) { + return ValidateBy({ + name: IS_LONGITUDE, + validator: { + validate: (value, args) => isLongitude(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a longitude string or number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLongitude.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js.map new file mode 100644 index 0000000..39adcf5 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsLongitude.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsLongitude.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACrC,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,IAAI,SAAS,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gDAAgD,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLongitude.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js b/src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js new file mode 100644 index 0000000..3f5c495 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_NOT_EMPTY = "isNotEmpty"; +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +export function isNotEmpty(value) { + return value !== "" && value !== null && value !== undefined; +} +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +export function IsNotEmpty(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY, + validator: { + validate: (value, args) => isNotEmpty(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be empty", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNotEmpty.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js.map new file mode 100644 index 0000000..3681ae8 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsNotEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsNotEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;YAC5C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+BAA+B,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNotEmpty.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js b/src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js new file mode 100644 index 0000000..e36d547 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_NOT_IN = "isNotIn"; +/** + * Checks if given value not in a array of allowed values. + */ +export function isNotIn(value, possibleValues) { + return !(possibleValues instanceof Array) || !possibleValues.some(possibleValue => possibleValue === value); +} +/** + * Checks if given value not in a array of allowed values. + */ +export function IsNotIn(values, validationOptions) { + return ValidateBy({ + name: IS_NOT_IN, + constraints: [values], + validator: { + validate: (value, args) => isNotIn(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be one of the following values: $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNotIn.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js.map new file mode 100644 index 0000000..abaca34 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsNotIn.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsNotIn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;AAEnC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,cAAyB;IAC7D,OAAO,CAAC,CAAC,cAAc,YAAY,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,KAAK,KAAK,CAAC,CAAC;AAChH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,MAAa,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,mEAAmE,EAChG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNotIn.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js b/src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js new file mode 100644 index 0000000..245cb81 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js @@ -0,0 +1,22 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Checks if value is missing and if so, ignores all validators. + */ +export function IsOptional(validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [(object, value) => { + return object[propertyName] !== null && object[propertyName] !== undefined; + }], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=IsOptional.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js.map b/src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js.map new file mode 100644 index 0000000..f6c0ff0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/IsOptional.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsOptional.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,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,MAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,sBAAsB;YAC5C,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,CAAC,CAAC,MAAW,EAAE,KAAU,EAAE,EAAE;oBACtC,OAAO,MAAM,CAAC,YAAY,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC;gBAC/E,CAAC,CAAC;YACF,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"IsOptional.js","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 * 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js b/src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js new file mode 100644 index 0000000..8cdee90 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const NOT_EQUALS = "notEquals"; +/** + * Checks if value does not match ("!==") the comparison. + */ +export function notEquals(value, comparison) { + return value !== comparison; +} +/** + * Checks if value does not match ("!==") the comparison. + */ +export function NotEquals(comparison, validationOptions) { + return ValidateBy({ + name: NOT_EQUALS, + constraints: [comparison], + validator: { + validate: (value, args) => notEquals(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not be equal to $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=NotEquals.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js.map b/src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js.map new file mode 100644 index 0000000..c2d3f3f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/NotEquals.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/NotEquals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,UAAmB;IACzD,OAAO,KAAK,KAAK,UAAU,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,UAAe,EAAE,iBAAqC;IAC5E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAChE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+CAA+C,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"NotEquals.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/Validate.js b/src/node_modules/class-validator/esm2015/decorator/common/Validate.js new file mode 100644 index 0000000..08ca63c --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/Validate.js @@ -0,0 +1,35 @@ +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ConstraintMetadata } from "../../metadata/ConstraintMetadata"; +/** + * Registers custom validator class. + */ +export function ValidatorConstraint(options) { + return function (target) { + const isAsync = options && options.async ? true : false; + let name = options && options.name ? options.name : ""; + if (!name) { + name = target.name; + if (!name) // generate name if it was not given + name = name.replace(/\.?([A-Z]+)/g, (x, y) => "_" + y.toLowerCase()).replace(/^_/, ""); + } + const metadata = new ConstraintMetadata(target, name, isAsync); + getMetadataStorage().addConstraintMetadata(metadata); + }; +} +export function Validate(constraintClass, constraintsOrValidationOptions, maybeValidationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.CUSTOM_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraintCls: constraintClass, + constraints: constraintsOrValidationOptions instanceof Array ? constraintsOrValidationOptions : undefined, + validationOptions: !(constraintsOrValidationOptions instanceof Array) ? constraintsOrValidationOptions : maybeValidationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=Validate.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/Validate.js.map b/src/node_modules/class-validator/esm2015/decorator/common/Validate.js.map new file mode 100644 index 0000000..3ee8981 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/Validate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/Validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAA4C;IAC5E,OAAO,UAAU,MAAgB;QAC7B,MAAM,OAAO,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;QACxD,IAAI,IAAI,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC,IAAI,EAAE;YACP,IAAI,GAAI,MAAc,CAAC,IAAI,CAAC;YAC5B,IAAI,CAAC,IAAI,EAAE,oCAAoC;gBAC3C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;SAC9F;QACD,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/D,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACzD,CAAC,CAAC;AACN,CAAC;AAQD,MAAM,UAAU,QAAQ,CAAC,eAAyB,EAAE,8BAA0D,EAAE,sBAA0C;IACtJ,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,MAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,iBAAiB;YACvC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,aAAa,EAAE,eAAe;YAC9B,WAAW,EAAE,8BAA8B,YAAY,KAAK,CAAC,CAAC,CAAC,8BAAuC,CAAC,CAAC,CAAC,SAAS;YAClH,iBAAiB,EAAE,CAAC,CAAC,8BAA8B,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,8BAAmD,CAAC,CAAC,CAAC,sBAAsB;SACvJ,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"Validate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js b/src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js new file mode 100644 index 0000000..6e141df --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js @@ -0,0 +1,23 @@ +import { registerDecorator } from "../../register-decorator"; +export function buildMessage(impl, validationOptions) { + return (validationArguments) => { + const eachPrefix = validationOptions && validationOptions.each + ? "each value in " + : ""; + return impl(eachPrefix, validationArguments); + }; +} +export function ValidateBy(options, validationOptions) { + return function (object, propertyName) { + registerDecorator({ + name: options.name, + target: object.constructor, + propertyName: propertyName, + options: validationOptions, + constraints: options.constraints, + validator: options.validator + }); + }; +} + +//# sourceMappingURL=ValidateBy.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js.map b/src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js.map new file mode 100644 index 0000000..ebfb056 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidateBy.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/ValidateBy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAW7D,MAAM,UAAU,YAAY,CACxB,IAAgE,EAChE,iBAAqC;IAErC,OAAO,CAAC,mBAAyC,EAAE,EAAE;QACjD,MAAM,UAAU,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,IAAI;YAC1D,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;IACjD,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAA0B,EAAE,iBAAqC;IACxF,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,iBAAiB,CAAC;YACd,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;SAC/B,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC","file":"ValidateBy.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js b/src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js new file mode 100644 index 0000000..d6fc391 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js @@ -0,0 +1,20 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +export function ValidateIf(condition, validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [condition], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=ValidateIf.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js.map b/src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js.map new file mode 100644 index 0000000..48035f3 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidateIf.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/ValidateIf.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,UAAU,CAAC,SAA+C,EAAE,iBAAqC;IAC7G,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,MAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,sBAAsB;YAC5C,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,CAAC,SAAS,CAAC;YACxB,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"ValidateIf.js","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 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js b/src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js new file mode 100644 index 0000000..ee3d5aa --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js @@ -0,0 +1,22 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +export function ValidateNested(validationOptions) { + const opts = { ...validationOptions }; + const eachPrefix = opts.each ? "each value in " : ""; + opts.message = opts.message || eachPrefix + "nested property $property must be either object or array"; + return function (object, propertyName) { + const args = { + type: ValidationTypes.NESTED_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: opts, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=ValidateNested.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js.map b/src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js.map new file mode 100644 index 0000000..5c00166 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidateNested.js.map @@ -0,0 +1 @@ +{"version":3,"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;IAChE,MAAM,IAAI,GAAsB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACzD,MAAM,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;QACjD,MAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,iBAAiB;YACvC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,IAAI;SAC1B,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"ValidateNested.js","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) {\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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js b/src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js new file mode 100644 index 0000000..19da48c --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js @@ -0,0 +1,19 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Resolve promise before validation + */ +export function ValidatePromise(validationOptions) { + return function (object, propertyName) { + const args = { + type: ValidationTypes.PROMISE_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=ValidatePromise.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js.map b/src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js.map new file mode 100644 index 0000000..f1d8d0e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/common/ValidatePromise.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/ValidatePromise.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,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,MAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,kBAAkB;YACxC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"ValidatePromise.js","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 * 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js b/src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js new file mode 100644 index 0000000..3f403d4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const MAX_DATE = "maxDate"; +/** +* Checks if the value is a date that's before the specified date. +*/ +export function maxDate(date, maxDate) { + return date instanceof Date && date.getTime() <= maxDate.getTime(); +} +/** + * Checks if the value is a date that's after the specified date. + */ +export function MaxDate(date, validationOptions) { + return ValidateBy({ + name: MAX_DATE, + constraints: [date], + validator: { + validate: (value, args) => maxDate(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => "maximal allowed date for " + eachPrefix + "$property is $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MaxDate.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js.map b/src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js.map new file mode 100644 index 0000000..45dcf1b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/date/MaxDate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/date/MaxDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAEjC;;EAEE;AACH,MAAM,UAAU,OAAO,CAAC,IAAa,EAAE,OAAa;IAChD,OAAO,IAAI,YAAY,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;AACvE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAU,EAAE,iBAAqC;IACrE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,2BAA2B,GAAG,UAAU,GAAG,2BAA2B,EACtF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MaxDate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/date/MinDate.js b/src/node_modules/class-validator/esm2015/decorator/date/MinDate.js new file mode 100644 index 0000000..ef6de03 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/date/MinDate.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const MIN_DATE = "minDate"; +/** + * Checks if the value is a date that's after the specified date. + */ +export function minDate(date, minDate) { + return date instanceof Date && date.getTime() >= minDate.getTime(); +} +/** + * Checks if the value is a date that's after the specified date. + */ +export function MinDate(date, validationOptions) { + return ValidateBy({ + name: MIN_DATE, + constraints: [date], + validator: { + validate: (value, args) => minDate(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => "minimal allowed date for " + eachPrefix + "$property is $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MinDate.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/date/MinDate.js.map b/src/node_modules/class-validator/esm2015/decorator/date/MinDate.js.map new file mode 100644 index 0000000..f9983d3 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/date/MinDate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/date/MinDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAa,EAAE,OAAa;IAChD,OAAO,IAAI,YAAY,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;AACvE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAU,EAAE,iBAAqC;IACrE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,2BAA2B,GAAG,UAAU,GAAG,2BAA2B,EACtF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MinDate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/decorators.js b/src/node_modules/class-validator/esm2015/decorator/decorators.js new file mode 100644 index 0000000..32b8621 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/decorators.js @@ -0,0 +1,132 @@ +// ------------------------------------------------------------------------- +// System +// ------------------------------------------------------------------------- +// ------------------------------------------------------------------------- +// Common checkers +// ------------------------------------------------------------------------- +export * from "./common/Allow"; +export * from "./common/IsDefined"; +export * from "./common/IsOptional"; +export * from "./common/Validate"; +export * from "./common/ValidateBy"; +export * from "./common/ValidateIf"; +export * from "./common/ValidateNested"; +export * from "./common/ValidatePromise"; +export * from "./common/IsLatLong"; +export * from "./common/IsLatitude"; +export * from "./common/IsLongitude"; +export * from "./common/Equals"; +export * from "./common/NotEquals"; +export * from "./common/IsEmpty"; +export * from "./common/IsNotEmpty"; +export * from "./common/IsIn"; +export * from "./common/IsNotIn"; +// ------------------------------------------------------------------------- +// Number checkers +// ------------------------------------------------------------------------- +export * from "./number/IsDivisibleBy"; +export * from "./number/IsPositive"; +export * from "./number/IsNegative"; +export * from "./number/Max"; +export * from "./number/Min"; +// ------------------------------------------------------------------------- +// Date checkers +// ------------------------------------------------------------------------- +export * from "./date/MinDate"; +export * from "./date/MaxDate"; +// ------------------------------------------------------------------------- +// String checkers +// ------------------------------------------------------------------------- +export * from "./string/Contains"; +export * from "./string/NotContains"; +export * from "./string/IsAlpha"; +export * from "./string/IsAlphanumeric"; +export * from "./string/IsDecimal"; +export * from "./string/IsAscii"; +export * from "./string/IsBase64"; +export * from "./string/IsByteLength"; +export * from "./string/IsCreditCard"; +export * from "./string/IsCurrency"; +export * from "./string/IsEmail"; +export * from "./string/IsFQDN"; +export * from "./string/IsFullWidth"; +export * from "./string/IsHalfWidth"; +export * from "./string/IsVariableWidth"; +export * from "./string/IsHexColor"; +export * from "./string/IsHexadecimal"; +export * from "./string/IsMacAddress"; +export * from "./string/IsIP"; +export * from "./string/IsPort"; +export * from "./string/IsISBN"; +export * from "./string/IsISIN"; +export * from "./string/IsISO8601"; +export * from "./string/IsJSON"; +export * from "./string/IsJWT"; +export * from "./string/IsLowercase"; +export * from "./string/IsMobilePhone"; +export * from "./string/IsISO31661Alpha2"; +export * from "./string/IsISO31661Alpha3"; +export * from "./string/IsMongoId"; +export * from "./string/IsMultibyte"; +export * from "./string/IsSurrogatePair"; +export * from "./string/IsUrl"; +export * from "./string/IsUUID"; +export * from "./string/IsFirebasePushId"; +export * from "./string/IsUppercase"; +export * from "./string/Length"; +export * from "./string/MaxLength"; +export * from "./string/MinLength"; +export * from "./string/Matches"; +export * from "./string/IsPhoneNumber"; +export * from "./string/IsMilitaryTime"; +export * from "./string/IsHash"; +export * from "./string/IsISSN"; +export * from "./string/IsDateString"; +export * from "./string/IsBooleanString"; +export * from "./string/IsNumberString"; +export * from "./string/IsBase32"; +export * from "./string/IsBIC"; +export * from "./string/IsBtcAddress"; +export * from "./string/IsDataURI"; +export * from "./string/IsEAN"; +export * from "./string/IsEthereumAddress"; +export * from "./string/IsHSL"; +export * from "./string/IsIBAN"; +export * from "./string/IsIdentityCard"; +export * from "./string/IsISRC"; +export * from "./string/IsLocale"; +export * from "./string/IsMagnetURI"; +export * from "./string/IsMimeType"; +export * from "./string/IsOctal"; +export * from "./string/IsPassportNumber"; +export * from "./string/IsPostalCode"; +export * from "./string/IsRFC3339"; +export * from "./string/IsRgbColor"; +export * from "./string/IsSemVer"; +// ------------------------------------------------------------------------- +// Type checkers +// ------------------------------------------------------------------------- +export * from "./typechecker/IsBoolean"; +export * from "./typechecker/IsDate"; +export * from "./typechecker/IsNumber"; +export * from "./typechecker/IsEnum"; +export * from "./typechecker/IsInt"; +export * from "./typechecker/IsString"; +export * from "./typechecker/IsArray"; +export * from "./typechecker/IsObject"; +// ------------------------------------------------------------------------- +// Array checkers +// ------------------------------------------------------------------------- +export * from "./array/ArrayContains"; +export * from "./array/ArrayNotContains"; +export * from "./array/ArrayNotEmpty"; +export * from "./array/ArrayMinSize"; +export * from "./array/ArrayMaxSize"; +export * from "./array/ArrayUnique"; +// ------------------------------------------------------------------------- +// Object checkers +// ------------------------------------------------------------------------- +export * from "./object/IsNotEmptyObject"; +export * from "./object/IsInstance"; + +//# sourceMappingURL=decorators.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/decorators.js.map b/src/node_modules/class-validator/esm2015/decorator/decorators.js.map new file mode 100644 index 0000000..3429231 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/decorators.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/decorators.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,SAAS;AACT,4EAA4E;AAE5E,4EAA4E;AAC5E,kBAAkB;AAClB,4EAA4E;AAE5E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AAEjC,4EAA4E;AAC5E,kBAAkB;AAClB,4EAA4E;AAE5E,cAAc,wBAAwB,CAAC;AACvC,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;AAEpC,4EAA4E;AAC5E,kBAAkB;AAClB,4EAA4E;AAE5E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC","file":"decorators.js","sourcesContent":["// -------------------------------------------------------------------------\n// System\n// -------------------------------------------------------------------------\n\n// -------------------------------------------------------------------------\n// Common checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./common/Allow\";\nexport * from \"./common/IsDefined\";\nexport * from \"./common/IsOptional\";\nexport * from \"./common/Validate\";\nexport * from \"./common/ValidateBy\";\nexport * from \"./common/ValidateIf\";\nexport * from \"./common/ValidateNested\";\nexport * from \"./common/ValidatePromise\";\nexport * from \"./common/IsLatLong\";\nexport * from \"./common/IsLatitude\";\nexport * from \"./common/IsLongitude\";\nexport * from \"./common/Equals\";\nexport * from \"./common/NotEquals\";\nexport * from \"./common/IsEmpty\";\nexport * from \"./common/IsNotEmpty\";\nexport * from \"./common/IsIn\";\nexport * from \"./common/IsNotIn\";\n\n// -------------------------------------------------------------------------\n// Number checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./number/IsDivisibleBy\";\nexport * from \"./number/IsPositive\";\nexport * from \"./number/IsNegative\";\nexport * from \"./number/Max\";\nexport * from \"./number/Min\";\n\n// -------------------------------------------------------------------------\n// Date checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./date/MinDate\";\nexport * from \"./date/MaxDate\";\n\n// -------------------------------------------------------------------------\n// String checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./string/Contains\";\nexport * from \"./string/NotContains\";\nexport * from \"./string/IsAlpha\";\nexport * from \"./string/IsAlphanumeric\";\nexport * from \"./string/IsDecimal\";\nexport * from \"./string/IsAscii\";\nexport * from \"./string/IsBase64\";\nexport * from \"./string/IsByteLength\";\nexport * from \"./string/IsCreditCard\";\nexport * from \"./string/IsCurrency\";\nexport * from \"./string/IsEmail\";\nexport * from \"./string/IsFQDN\";\nexport * from \"./string/IsFullWidth\";\nexport * from \"./string/IsHalfWidth\";\nexport * from \"./string/IsVariableWidth\";\nexport * from \"./string/IsHexColor\";\nexport * from \"./string/IsHexadecimal\";\nexport * from \"./string/IsMacAddress\";\nexport * from \"./string/IsIP\";\nexport * from \"./string/IsPort\";\nexport * from \"./string/IsISBN\";\nexport * from \"./string/IsISIN\";\nexport * from \"./string/IsISO8601\";\nexport * from \"./string/IsJSON\";\nexport * from \"./string/IsJWT\";\nexport * from \"./string/IsLowercase\";\nexport * from \"./string/IsMobilePhone\";\nexport * from \"./string/IsISO31661Alpha2\";\nexport * from \"./string/IsISO31661Alpha3\";\nexport * from \"./string/IsMongoId\";\nexport * from \"./string/IsMultibyte\";\nexport * from \"./string/IsSurrogatePair\";\nexport * from \"./string/IsUrl\";\nexport * from \"./string/IsUUID\";\nexport * from \"./string/IsFirebasePushId\";\nexport * from \"./string/IsUppercase\";\nexport * from \"./string/Length\";\nexport * from \"./string/MaxLength\";\nexport * from \"./string/MinLength\";\nexport * from \"./string/Matches\";\nexport * from \"./string/IsPhoneNumber\";\nexport * from \"./string/IsMilitaryTime\";\nexport * from \"./string/IsHash\";\nexport * from \"./string/IsISSN\";\nexport * from \"./string/IsDateString\";\nexport * from \"./string/IsBooleanString\";\nexport * from \"./string/IsNumberString\";\nexport * from \"./string/IsBase32\";\nexport * from \"./string/IsBIC\";\nexport * from \"./string/IsBtcAddress\";\nexport * from \"./string/IsDataURI\";\nexport * from \"./string/IsEAN\";\nexport * from \"./string/IsEthereumAddress\";\nexport * from \"./string/IsHSL\";\nexport * from \"./string/IsIBAN\";\nexport * from \"./string/IsIdentityCard\";\nexport * from \"./string/IsISRC\";\nexport * from \"./string/IsLocale\";\nexport * from \"./string/IsMagnetURI\";\nexport * from \"./string/IsMimeType\";\nexport * from \"./string/IsOctal\";\nexport * from \"./string/IsPassportNumber\";\nexport * from \"./string/IsPostalCode\";\nexport * from \"./string/IsRFC3339\";\nexport * from \"./string/IsRgbColor\";\nexport * from \"./string/IsSemVer\";\n\n// -------------------------------------------------------------------------\n// Type checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./typechecker/IsBoolean\";\nexport * from \"./typechecker/IsDate\";\nexport * from \"./typechecker/IsNumber\";\nexport * from \"./typechecker/IsEnum\";\nexport * from \"./typechecker/IsInt\";\nexport * from \"./typechecker/IsString\";\nexport * from \"./typechecker/IsArray\";\nexport * from \"./typechecker/IsObject\";\n\n// -------------------------------------------------------------------------\n// Array checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./array/ArrayContains\";\nexport * from \"./array/ArrayNotContains\";\nexport * from \"./array/ArrayNotEmpty\";\nexport * from \"./array/ArrayMinSize\";\nexport * from \"./array/ArrayMaxSize\";\nexport * from \"./array/ArrayUnique\";\n\n// -------------------------------------------------------------------------\n// Object checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./object/IsNotEmptyObject\";\nexport * from \"./object/IsInstance\";\n"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js b/src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js new file mode 100644 index 0000000..de373a3 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_DIVISIBLE_BY = "isDivisibleBy"; +/** + * Checks if value is a number that's divisible by another. + */ +export function isDivisibleBy(value, num) { + return typeof value === "number" && + typeof num === "number" && + validator.isDivisibleBy(String(value), num); +} +/** + * Checks if value is a number that's divisible by another. + */ +export function IsDivisibleBy(num, validationOptions) { + return ValidateBy({ + name: IS_DIVISIBLE_BY, + constraints: [num], + validator: { + validate: (value, args) => isDivisibleBy(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be divisible by $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDivisibleBy.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js.map b/src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js.map new file mode 100644 index 0000000..4d5424d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/IsDivisibleBy.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/IsDivisibleBy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,GAAW;IACrD,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC5B,OAAO,GAAG,KAAK,QAAQ;QACvB,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,iBAAqC;IAC5E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACpE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,6CAA6C,EAC1E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDivisibleBy.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js b/src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js new file mode 100644 index 0000000..cb9554d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_NEGATIVE = "isNegative"; +/** + * Checks if the value is a negative number smaller than zero. + */ +export function isNegative(value) { + return typeof value === "number" && value < 0; +} +/** + * Checks if the value is a negative number smaller than zero. + */ +export function IsNegative(validationOptions) { + return ValidateBy({ + name: IS_NEGATIVE, + validator: { + validate: (value, args) => isNegative(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a negative number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNegative.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js.map b/src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js.map new file mode 100644 index 0000000..69f86f2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/IsNegative.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/IsNegative.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;YAC5C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,qCAAqC,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNegative.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js b/src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js new file mode 100644 index 0000000..3722617 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_POSITIVE = "isPositive"; +/** + * Checks if the value is a positive number greater than zero. + */ +export function isPositive(value) { + return typeof value === "number" && value > 0; +} +/** + * Checks if the value is a positive number greater than zero. + */ +export function IsPositive(validationOptions) { + return ValidateBy({ + name: IS_POSITIVE, + validator: { + validate: (value, args) => isPositive(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a positive number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPositive.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js.map b/src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js.map new file mode 100644 index 0000000..5ad951d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/IsPositive.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/IsPositive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;YAC5C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,qCAAqC,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPositive.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/number/Max.js b/src/node_modules/class-validator/esm2015/decorator/number/Max.js new file mode 100644 index 0000000..152cc3f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/Max.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const MAX = "max"; +/** + * Checks if the first number is less than or equal to the second. + */ +export function max(num, max) { + return typeof num === "number" && typeof max === "number" && num <= max; +} +/** + * Checks if the first number is less than or equal to the second. + */ +export function Max(maxValue, validationOptions) { + return ValidateBy({ + name: MAX, + constraints: [maxValue], + validator: { + validate: (value, args) => max(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must not be greater than $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Max.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/number/Max.js.map b/src/node_modules/class-validator/esm2015/decorator/number/Max.js.map new file mode 100644 index 0000000..1163024 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/Max.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/Max.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,GAAY,EAAE,GAAW;IACzC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,iBAAqC;IACvE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,CAAC,QAAQ,CAAC;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC1D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iDAAiD,EAC9E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Max.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/number/Min.js b/src/node_modules/class-validator/esm2015/decorator/number/Min.js new file mode 100644 index 0000000..61991f6 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/Min.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const MIN = "min"; +/** + * Checks if the first number is greater than or equal to the second. + */ +export function min(num, min) { + return typeof num === "number" && typeof min === "number" && num >= min; +} +/** + * Checks if the first number is greater than or equal to the second. + */ +export function Min(minValue, validationOptions) { + return ValidateBy({ + name: MIN, + constraints: [minValue], + validator: { + validate: (value, args) => min(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must not be less than $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Min.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/number/Min.js.map b/src/node_modules/class-validator/esm2015/decorator/number/Min.js.map new file mode 100644 index 0000000..2a08a32 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/number/Min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/Min.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,GAAY,EAAE,GAAW;IACzC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,iBAAqC;IACvE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,CAAC,QAAQ,CAAC;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC1D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,8CAA8C,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Min.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js b/src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js new file mode 100644 index 0000000..87cecd0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js @@ -0,0 +1,32 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_INSTANCE = "isInstance"; +/** + * Checks if the value is an instance of the specified object. + */ +export function isInstance(object, targetTypeConstructor) { + return targetTypeConstructor + && typeof targetTypeConstructor === "function" + && object instanceof targetTypeConstructor; +} +/** + * Checks if the value is an instance of the specified object. + */ +export function IsInstance(targetType, validationOptions) { + return ValidateBy({ + name: IS_INSTANCE, + constraints: [targetType], + validator: { + validate: (value, args) => isInstance(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix, args) => { + if (args.constraints[0]) { + return eachPrefix + `$property must be an instance of ${args.constraints[0].name}`; + } + else { + return eachPrefix + `${IS_INSTANCE} decorator expects and object as value, but got falsy value.`; + } + }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsInstance.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js.map b/src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js.map new file mode 100644 index 0000000..5465f92 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/object/IsInstance.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/object/IsInstance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,MAAe,EAAE,qBAAkD;IAC1F,OAAO,qBAAqB;WACrB,OAAO,qBAAqB,KAAK,UAAU;WAC3C,MAAM,YAAY,qBAAqB,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,UAAuC,EAAE,iBAAqC;IACrG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACjE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE;gBACjB,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;oBACrB,OAAO,UAAU,GAAG,oCAAoC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;iBACtF;qBAAM;oBACH,OAAO,UAAU,GAAG,GAAG,WAAW,8DAA8D,CAAC;iBACpG;YACL,CAAC,EACD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsInstance.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js b/src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js new file mode 100644 index 0000000..9be4558 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js @@ -0,0 +1,33 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import { isObject } from "../typechecker/IsObject"; +export const IS_NOT_EMPTY_OBJECT = "isNotEmptyObject"; +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +export function isNotEmptyObject(value) { + if (!isObject(value)) { + return false; + } + for (const key in value) { + if (value.hasOwnProperty(key)) { + return true; + } + } + return false; +} +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +export function IsNotEmptyObject(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY_OBJECT, + validator: { + validate: (value, args) => isNotEmptyObject(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a non-empty object", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNotEmptyObject.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js.map b/src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js.map new file mode 100644 index 0000000..1567b8d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/object/IsNotEmptyObject.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/object/IsNotEmptyObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAClB,OAAO,KAAK,CAAC;KAChB;IACD,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACrB,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC;SACf;KACJ;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;YAClD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,sCAAsC,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNotEmptyObject.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/Contains.js b/src/node_modules/class-validator/esm2015/decorator/string/Contains.js new file mode 100644 index 0000000..7ddbd55 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/Contains.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const CONTAINS = "contains"; +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +export function contains(value, seed) { + return typeof value === "string" && validator.contains(value, seed); +} +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +export function Contains(seed, validationOptions) { + return ValidateBy({ + name: CONTAINS, + constraints: [seed], + validator: { + validate: (value, args) => contains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a $constraint1 string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Contains.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/Contains.js.map b/src/node_modules/class-validator/esm2015/decorator/string/Contains.js.map new file mode 100644 index 0000000..5f6b4d1 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/Contains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/Contains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAEnC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc,EAAE,IAAY;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,8CAA8C,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Contains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js b/src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js new file mode 100644 index 0000000..02a952f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_ALPHA = "isAlpha"; +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +export function isAlpha(value, locale) { + return typeof value === "string" && ValidatorJS.isAlpha(value, locale); +} +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +export function IsAlpha(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHA, + constraints: [locale], + validator: { + validate: (value, args) => isAlpha(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain only letters (a-zA-Z)", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsAlpha.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js.map new file mode 100644 index 0000000..fcac0f4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsAlpha.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsAlpha.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,MAAgC;IACpE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,MAAe,EAAE,iBAAqC;IAC1E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,8CAA8C,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsAlpha.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js b/src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js new file mode 100644 index 0000000..e9eb953 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_ALPHANUMERIC = "isAlphanumeric"; +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export function isAlphanumeric(value, locale) { + return typeof value === "string" && ValidatorJS.isAlphanumeric(value, locale); +} +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export function IsAlphanumeric(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHANUMERIC, + constraints: [locale], + validator: { + validate: (value, args) => isAlphanumeric(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain only letters and numbers", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsAlphanumeric.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js.map new file mode 100644 index 0000000..adbb450 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsAlphanumeric.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsAlphanumeric.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC;AAEhD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,MAAuC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAClF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAe,EAAE,iBAAqC;IACjF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACrE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iDAAiD,EAC9E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsAlphanumeric.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js b/src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js new file mode 100644 index 0000000..056990e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_ASCII = "isAscii"; +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +export function isAscii(value) { + return typeof value === "string" && validator.isAscii(value); +} +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +export function IsAscii(validationOptions) { + return ValidateBy({ + name: IS_ASCII, + validator: { + validate: (value, args) => isAscii(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain only ASCII characters", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsAscii.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js.map new file mode 100644 index 0000000..d2bd375 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsAscii.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsAscii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;YACzC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,8CAA8C,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsAscii.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js b/src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js new file mode 100644 index 0000000..9c45508 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_BIC = "isBIC"; +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +export function isBIC(value) { + return typeof value === "string" && validator.isBIC(value); +} +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +export function IsBIC(validationOptions) { + return ValidateBy({ + name: IS_BIC, + validator: { + validate: (value, args) => isBIC(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a BIC or SWIFT code", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBIC.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js.map new file mode 100644 index 0000000..c678c6b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBIC.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBIC.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACvC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,uCAAuC,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBIC.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js b/src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js new file mode 100644 index 0000000..ceb01fa --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_BASE32 = "isBase32"; +/** + * Checks if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +export function isBase32(value) { + return typeof value === "string" && validator.isBase32(value); +} +/** + * Check if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +export function IsBase32(validationOptions) { + return ValidateBy({ + name: IS_BASE32, + validator: { + validate: (value, args) => isBase32(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be base32 encoded", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBase32.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js.map new file mode 100644 index 0000000..0df661f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBase32.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBase32.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,kCAAkC,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBase32.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js b/src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js new file mode 100644 index 0000000..1b28916 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_BASE64 = "isBase64"; +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +export function isBase64(value) { + return typeof value === "string" && validator.isBase64(value); +} +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +export function IsBase64(validationOptions) { + return ValidateBy({ + name: IS_BASE64, + validator: { + validate: (value, args) => isBase64(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be base64 encoded", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBase64.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js.map new file mode 100644 index 0000000..bdc02f4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBase64.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBase64.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,kCAAkC,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBase64.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js b/src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js new file mode 100644 index 0000000..e50e0c2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_BOOLEAN_STRING = "isBooleanString"; +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +export function isBooleanString(value) { + return typeof value === "string" && validator.isBoolean(value); +} +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +export function IsBooleanString(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN_STRING, + validator: { + validate: (value, args) => isBooleanString(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a boolean string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBooleanString.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js.map new file mode 100644 index 0000000..2facbba --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBooleanString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBooleanString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;YACjD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,oCAAoC,EACjE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBooleanString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js b/src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js new file mode 100644 index 0000000..8006352 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_BTC_ADDRESS = "isBtcAddress"; +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +export function isBtcAddress(value) { + return typeof value === "string" && validator.isBtcAddress(value); +} +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +export function IsBtcAddress(validationOptions) { + return ValidateBy({ + name: IS_BTC_ADDRESS, + validator: { + validate: (value, args) => isBtcAddress(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a BTC address", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBtcAddress.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js.map new file mode 100644 index 0000000..6033133 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsBtcAddress.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBtcAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,iBAAqC;IAC9D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;YAC9C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iCAAiC,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBtcAddress.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js b/src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js new file mode 100644 index 0000000..c869ec3 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_BYTE_LENGTH = "isByteLength"; +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +export function isByteLength(value, min, max) { + return typeof value === "string" && validator.isByteLength(value, { min, max }); +} +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +export function IsByteLength(min, max, validationOptions) { + return ValidateBy({ + name: IS_BYTE_LENGTH, + constraints: [min, max], + validator: { + validate: (value, args) => isByteLength(value, args.constraints[0], args.constraints[1]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property's byte length must fall into ($constraint1, $constraint2) range", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsByteLength.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js.map new file mode 100644 index 0000000..eb30df0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsByteLength.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsByteLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,GAAW,EAAE,GAAY;IAClE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,GAAY,EAAE,iBAAqC;IACzF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACxF,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,2EAA2E,EACxG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsByteLength.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js b/src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js new file mode 100644 index 0000000..62099ce --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_CREDIT_CARD = "isCreditCard"; +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +export function isCreditCard(value) { + return typeof value === "string" && validator.isCreditCard(value); +} +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +export function IsCreditCard(validationOptions) { + return ValidateBy({ + name: IS_CREDIT_CARD, + validator: { + validate: (value, args) => isCreditCard(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a credit card", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsCreditCard.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js.map new file mode 100644 index 0000000..4fb1678 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsCreditCard.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsCreditCard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,iBAAqC;IAC9D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;YAC9C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iCAAiC,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsCreditCard.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js b/src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js new file mode 100644 index 0000000..b357706 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_CURRENCY = "isCurrency"; +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +export function isCurrency(value, options) { + return typeof value === "string" && ValidatorJS.isCurrency(value, options); +} +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +export function IsCurrency(options, validationOptions) { + return ValidateBy({ + name: IS_CURRENCY, + constraints: [options], + validator: { + validate: (value, args) => isCurrency(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a currency", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsCurrency.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js.map new file mode 100644 index 0000000..b6591b0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsCurrency.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsCurrency.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc,EAAE,OAAuC;IAC9E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,OAAuC,EAAE,iBAAqC;IACrG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACjE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,8BAA8B,EAC3D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsCurrency.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js b/src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js new file mode 100644 index 0000000..8ff72f5 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_DATA_URI = "isDataURI"; +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +export function isDataURI(value) { + return typeof value === "string" && validator.isDataURI(value); +} +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +export function IsDataURI(validationOptions) { + return ValidateBy({ + name: IS_DATA_URI, + validator: { + validate: (value, args) => isDataURI(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a data uri format", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDataURI.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js.map new file mode 100644 index 0000000..c61284a --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsDataURI.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsDataURI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;YAC3C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,qCAAqC,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDataURI.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js b/src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js new file mode 100644 index 0000000..3076b5b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_DATE_STRING = "isDateString"; +/** + * Checks if a given value is a ISOString date. + */ +export function isDateString(value) { + 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; + return typeof value === "string" && regex.test(value); +} +/** + * Checks if a given value is a ISOString date. + */ +export function IsDateString(validationOptions) { + return ValidateBy({ + name: IS_DATE_STRING, + validator: { + validate: (value, args) => isDateString(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a ISOString", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDateString.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js.map new file mode 100644 index 0000000..8131324 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsDateString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsDateString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,MAAM,KAAK,GAAG,6FAA6F,CAAC;IAC5G,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,iBAAqC;IAC9D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC;YAC9C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+BAA+B,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDateString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js b/src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js new file mode 100644 index 0000000..71ed16d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_DECIMAL = "isDecimal"; +/** + * Checks if the string is a valid decimal. + * If given value is not a string, then it returns false. + */ +export function isDecimal(value, options) { + return typeof value === "string" && ValidatorJS.isDecimal(value, options); +} +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export function IsDecimal(options, validationOptions) { + return ValidateBy({ + name: IS_DECIMAL, + constraints: [options], + validator: { + validate: (value, args) => isDecimal(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property is not a valid decimal number.", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDecimal.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js.map new file mode 100644 index 0000000..ed1475a --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsDecimal.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsDecimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,OAAsC;IAC5E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,OAAsC,EAAE,iBAAqC;IACnG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAChE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,0CAA0C,EACvE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDecimal.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js b/src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js new file mode 100644 index 0000000..e31baeb --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_EAN = "isEAN"; +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +export function isEAN(value) { + return typeof value === "string" && validator.isEAN(value); +} +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +export function IsEAN(validationOptions) { + return ValidateBy({ + name: IS_EAN, + validator: { + validate: (value, args) => isEAN(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an EAN (European Article Number)", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEAN.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js.map new file mode 100644 index 0000000..9718b45 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsEAN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsEAN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACvC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,oDAAoD,EACjF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEAN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js b/src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js new file mode 100644 index 0000000..ca588ff --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_EMAIL = "isEmail"; +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +export function isEmail(value, options) { + return typeof value === "string" && ValidatorJS.isEmail(value, options); +} +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +export function IsEmail(options, validationOptions) { + return ValidateBy({ + name: IS_EMAIL, + constraints: [options], + validator: { + validate: (value, args) => isEmail(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an email", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEmail.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js.map new file mode 100644 index 0000000..2473944 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsEmail.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsEmail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,OAAoC;IACxE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,OAAoC,EAAE,iBAAqC;IAC/F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,4BAA4B,EACzD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEmail.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js b/src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js new file mode 100644 index 0000000..ba1574b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_ETHEREUM_ADDRESS = "isEthereumAddress"; +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +export function isEthereumAddress(value) { + return typeof value === "string" && validator.isEthereumAddress(value); +} +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +export function IsEthereumAddress(validationOptions) { + return ValidateBy({ + name: IS_ETHEREUM_ADDRESS, + validator: { + validate: (value, args) => isEthereumAddress(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an Ethereum address", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEthereumAddress.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js.map new file mode 100644 index 0000000..6467458 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsEthereumAddress.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsEthereumAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,iBAAqC;IACnE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC;YACnD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,uCAAuC,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEthereumAddress.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js b/src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js new file mode 100644 index 0000000..9bbed6c --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_FQDN = "isFqdn"; +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +export function isFQDN(value, options) { + return typeof value === "string" && ValidatorJS.isFQDN(value, options); +} +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +export function IsFQDN(options, validationOptions) { + return ValidateBy({ + name: IS_FQDN, + constraints: [options], + validator: { + validate: (value, args) => isFQDN(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid domain name", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsFQDN.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js.map new file mode 100644 index 0000000..29e1d37 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsFQDN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsFQDN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAmC;IACtE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAmC,EAAE,iBAAqC;IAC7F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,uCAAuC,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsFQDN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js b/src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js new file mode 100644 index 0000000..29605ca --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_FIREBASE_PUSH_ID = "IsFirebasePushId"; +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +export function isFirebasePushId(value) { + const webSafeRegex = /^[a-zA-Z0-9_-]*$/; + return typeof value === "string" && value.length === 20 && webSafeRegex.test(value); +} +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +export function IsFirebasePushId(validationOptions) { + return ValidateBy({ + name: IS_FIREBASE_PUSH_ID, + validator: { + validate: (value, args) => isFirebasePushId(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a Firebase Push Id", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsFirebasePushId.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js.map new file mode 100644 index 0000000..bd2d0e2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsFirebasePushId.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsFirebasePushId.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,MAAM,YAAY,GAAG,kBAAkB,CAAC;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;YAClD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,sCAAsC,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsFirebasePushId.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js b/src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js new file mode 100644 index 0000000..dc86d8d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_FULL_WIDTH = "isFullWidth"; +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export function isFullWidth(value) { + return typeof value === "string" && validator.isFullWidth(value); +} +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export function IsFullWidth(validationOptions) { + return ValidateBy({ + name: IS_FULL_WIDTH, + validator: { + validate: (value, args) => isFullWidth(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a full-width characters", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsFullWidth.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js.map new file mode 100644 index 0000000..69df4a6 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsFullWidth.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsFullWidth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gDAAgD,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsFullWidth.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js b/src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js new file mode 100644 index 0000000..432788b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_HSL = "isHSL"; +/** +* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +export function isHSL(value) { + return typeof value === "string" && validator.isHSL(value); +} +/** + * Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +export function IsHSL(validationOptions) { + return ValidateBy({ + name: IS_HSL, + validator: { + validate: (value, args) => isHSL(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a HSL color", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHSL.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js.map new file mode 100644 index 0000000..f0fd970 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHSL.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHSL.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACvC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+BAA+B,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHSL.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js b/src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js new file mode 100644 index 0000000..7bfe770 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_HALF_WIDTH = "isHalfWidth"; +/** + * Checks if the string contains any half-width chars. + * If given value is not a string, then it returns false. + */ +export function isHalfWidth(value) { + return typeof value === "string" && validator.isHalfWidth(value); +} +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export function IsHalfWidth(validationOptions) { + return ValidateBy({ + name: IS_HALF_WIDTH, + validator: { + validate: (value, args) => isHalfWidth(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a half-width characters", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHalfWidth.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js.map new file mode 100644 index 0000000..d81d03c --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHalfWidth.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHalfWidth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gDAAgD,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHalfWidth.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHash.js b/src/node_modules/class-validator/esm2015/decorator/string/IsHash.js new file mode 100644 index 0000000..a932681 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHash.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_HASH = "isHash"; +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +export function isHash(value, algorithm) { + return typeof value === "string" && ValidatorJS.isHash(value, algorithm); +} +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +export function IsHash(algorithm, validationOptions) { + return ValidateBy({ + name: IS_HASH, + constraints: [algorithm], + validator: { + validate: (value, args) => isHash(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a hash of type $constraint1", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHash.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHash.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsHash.js.map new file mode 100644 index 0000000..ae01023 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHash.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,SAAoC;IACvE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC7E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,SAAiB,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,SAAS,CAAC;QACxB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+CAA+C,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHash.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js b/src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js new file mode 100644 index 0000000..c8c94df --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_HEX_COLOR = "isHexColor"; +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +export function isHexColor(value) { + return typeof value === "string" && validator.isHexColor(value); +} +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +export function IsHexColor(validationOptions) { + return ValidateBy({ + name: IS_HEX_COLOR, + validator: { + validate: (value, args) => isHexColor(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a hexadecimal color", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHexColor.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js.map new file mode 100644 index 0000000..7ba2c94 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHexColor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHexColor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;YAC5C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,uCAAuC,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHexColor.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js b/src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js new file mode 100644 index 0000000..543feb7 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_HEXADECIMAL = "isHexadecimal"; +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +export function isHexadecimal(value) { + return typeof value === "string" && validator.isHexadecimal(value); +} +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +export function IsHexadecimal(validationOptions) { + return ValidateBy({ + name: IS_HEXADECIMAL, + validator: { + validate: (value, args) => isHexadecimal(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a hexadecimal number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHexadecimal.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js.map new file mode 100644 index 0000000..b4cf082 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsHexadecimal.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHexadecimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,iBAAqC;IAC/D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;YAC/C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,wCAAwC,EACrE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHexadecimal.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js b/src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js new file mode 100644 index 0000000..b029db2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_IBAN = "isIBAN"; +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +export function isIBAN(value) { + return typeof value === "string" && validator.isIBAN(value); +} +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +export function IsIBAN(validationOptions) { + return ValidateBy({ + name: IS_IBAN, + validator: { + validate: (value, args) => isIBAN(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an IBAN", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIBAN.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js.map new file mode 100644 index 0000000..8f3dd11 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsIBAN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsIBAN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,2BAA2B,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIBAN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsIP.js b/src/node_modules/class-validator/esm2015/decorator/string/IsIP.js new file mode 100644 index 0000000..9f42ab8 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsIP.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_IP = "isIp"; +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +export function isIP(value, version) { + const versionStr = version ? `${version}` : undefined; + return typeof value === "string" && ValidatorJS.isIP(value, versionStr); +} +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +export function IsIP(version, validationOptions) { + return ValidateBy({ + name: IS_IP, + constraints: [version], + validator: { + validate: (value, args) => isIP(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ip address", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIP.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsIP.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsIP.js.map new file mode 100644 index 0000000..071a294 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsIP.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsIP.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC;AAE5B;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,KAAc,EAAE,OAAqB;IACtD,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAE,GAAG,OAAO,EAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IACrE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,OAAqB,EAAE,iBAAqC;IAC7E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC3D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iCAAiC,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIP.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js b/src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js new file mode 100644 index 0000000..8ceb659 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_ISBN = "isIsbn"; +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +export function isISBN(value, version) { + const versionStr = version ? `${version}` : undefined; + return typeof value === "string" && ValidatorJS.isISBN(value, versionStr); +} +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +export function IsISBN(version, validationOptions) { + return ValidateBy({ + name: IS_ISBN, + constraints: [version], + validator: { + validate: (value, args) => isISBN(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ISBN", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISBN.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js.map new file mode 100644 index 0000000..a70892a --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISBN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISBN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAuB;IAC1D,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAE,GAAG,OAAO,EAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAuB,EAAE,iBAAqC;IACjF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,2BAA2B,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISBN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js b/src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js new file mode 100644 index 0000000..4692e80 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_ISIN = "isIsin"; +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +export function isISIN(value) { + return typeof value === "string" && validator.isISIN(value); +} +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +export function IsISIN(validationOptions) { + return ValidateBy({ + name: IS_ISIN, + validator: { + validate: (value, args) => isISIN(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ISIN (stock/security identifier)", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISIN.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js.map new file mode 100644 index 0000000..3f6c8f0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISIN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISIN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,uDAAuD,EACpF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISIN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js new file mode 100644 index 0000000..072ed38 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_ISO31661_ALPHA_2 = "isISO31661Alpha2"; +/** + * 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. + */ +export function isISO31661Alpha2(value) { + return typeof value === "string" && validator.isISO31661Alpha2(value); +} +/** + * 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. + */ +export function IsISO31661Alpha2(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_2, + validator: { + validate: (value, args) => isISO31661Alpha2(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid ISO31661 Alpha2 code", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISO31661Alpha2.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js.map new file mode 100644 index 0000000..dce1088 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISO31661Alpha2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;YAClD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gDAAgD,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISO31661Alpha2.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js new file mode 100644 index 0000000..fcf8ea4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_ISO31661_ALPHA_3 = "isISO31661Alpha3"; +/** + * 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. + */ +export function isISO31661Alpha3(value) { + return typeof value === "string" && validator.isISO31661Alpha3(value); +} +/** + * 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. + */ +export function IsISO31661Alpha3(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_3, + validator: { + validate: (value, args) => isISO31661Alpha3(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid ISO31661 Alpha3 code", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISO31661Alpha3.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js.map new file mode 100644 index 0000000..3dd3384 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISO31661Alpha3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISO31661Alpha3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;YAClD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gDAAgD,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISO31661Alpha3.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js b/src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js new file mode 100644 index 0000000..4620125 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_ISO8601 = "isIso8601"; +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +export function isISO8601(value, options) { + return typeof value === "string" && ValidatorJS.isISO8601(value, options); +} +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +export function IsISO8601(options, validationOptions) { + return ValidateBy({ + name: IS_ISO8601, + constraints: [options], + validator: { + validate: (value, args) => isISO8601(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid ISO 8601 date string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISO8601.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js.map new file mode 100644 index 0000000..4ef8b41 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISO8601.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISO8601.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,OAAsC;IAC5E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAsC,EAAE,iBAAqC;IACnG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAChE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gDAAgD,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISO8601.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js b/src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js new file mode 100644 index 0000000..61d4d4a --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_ISRC = "isISRC"; +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +export function isISRC(value) { + return typeof value === "string" && validator.isISRC(value); +} +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +export function IsISRC(validationOptions) { + return ValidateBy({ + name: IS_ISRC, + validator: { + validate: (value, args) => isISRC(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an ISRC", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISRC.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js.map new file mode 100644 index 0000000..92db2da --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISRC.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISRC.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,2BAA2B,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISRC.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js b/src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js new file mode 100644 index 0000000..46ee531 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_ISSN = "isISSN"; +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +export function isISSN(value, options) { + return typeof value === "string" && ValidatorJS.isISSN(value, options); +} +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +export function IsISSN(options, validationOptions) { + return ValidateBy({ + name: IS_ISSN, + constraints: [options], + validator: { + validate: (value, args) => isISSN(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a ISSN", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISSN.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js.map new file mode 100644 index 0000000..42c61c3 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsISSN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISSN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAmC;IACtE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAmC,EAAE,iBAAqC;IAC7F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,0BAA0B,EACvD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISSN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js b/src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js new file mode 100644 index 0000000..b6f63f3 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js @@ -0,0 +1,30 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_IDENTITY_CARD = "isIdentityCard"; +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +export function isIdentityCard(value, locale) { + return typeof value === "string" && ValidatorJS.isIdentityCard(value, locale); +} +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +export function IsIdentityCard(locale, validationOptions) { + return ValidateBy({ + name: IS_IDENTITY_CARD, + constraints: [locale], + validator: { + validate: (value, args) => isIdentityCard(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a identity card number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIdentityCard.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js.map new file mode 100644 index 0000000..c36a199 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsIdentityCard.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsIdentityCard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,MAAsC;IACjF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAClF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,MAAuC,EAAE,iBAAqC;IACzG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACrE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,0CAA0C,EACvE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIdentityCard.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js b/src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js new file mode 100644 index 0000000..3b56c4e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_JSON = "isJson"; +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +export function isJSON(value) { + return typeof value === "string" && validator.isJSON(value); +} +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +export function IsJSON(validationOptions) { + return ValidateBy({ + name: IS_JSON, + validator: { + validate: (value, args) => isJSON(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a json string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsJSON.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js.map new file mode 100644 index 0000000..6f9fc39 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsJSON.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsJSON.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iCAAiC,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsJSON.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js b/src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js new file mode 100644 index 0000000..620cc8d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_JWT = "isJwt"; +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +export function isJWT(value) { + return typeof value === "string" && validator.isJWT(value); +} +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +export function IsJWT(validationOptions) { + return ValidateBy({ + name: IS_JWT, + validator: { + validate: (value, args) => isJWT(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a jwt string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsJWT.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js.map new file mode 100644 index 0000000..5ad3814 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsJWT.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsJWT.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACvC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gCAAgC,EAC7D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsJWT.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js b/src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js new file mode 100644 index 0000000..22b9acf --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_LOCALE = "isLocale"; +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +export function isLocale(value) { + return typeof value === "string" && validator.isLocale(value); +} +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +export function IsLocale(validationOptions) { + return ValidateBy({ + name: IS_LOCALE, + validator: { + validate: (value, args) => isLocale(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be locale", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLocale.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js.map new file mode 100644 index 0000000..05495b2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsLocale.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsLocale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,0BAA0B,EACvD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLocale.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js b/src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js new file mode 100644 index 0000000..560eb52 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_LOWERCASE = "isLowercase"; +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +export function isLowercase(value) { + return typeof value === "string" && validator.isLowercase(value); +} +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +export function IsLowercase(validationOptions) { + return ValidateBy({ + name: IS_LOWERCASE, + validator: { + validate: (value, args) => isLowercase(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a lowercase string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLowercase.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js.map new file mode 100644 index 0000000..9086d47 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsLowercase.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsLowercase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,sCAAsC,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLowercase.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js b/src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js new file mode 100644 index 0000000..1fac338 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js @@ -0,0 +1,25 @@ +import { isValidationOptions } from "../ValidationOptions"; +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_MAC_ADDRESS = "isMacAddress"; +/** + * Check if the string is a MAC address. + * If given value is not a string, then it returns false. + */ +export function isMACAddress(value, options) { + return typeof value === "string" && ValidatorJS.isMACAddress(value, options); +} +export function IsMACAddress(optionsOrValidationOptionsArg, validationOptionsArg) { + const options = !isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : undefined; + const validationOptions = isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : validationOptionsArg; + return ValidateBy({ + name: IS_MAC_ADDRESS, + constraints: [options], + validator: { + validate: (value, args) => isMACAddress(value, options), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a MAC Address", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMacAddress.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js.map new file mode 100644 index 0000000..adf7403 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMacAddress.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMacAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,OAAyC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjF,CAAC;AAQD,MAAM,UAAU,YAAY,CAAC,6BAAmF,EAAE,oBAAwC;IACtJ,MAAM,OAAO,GAAG,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC;IAChH,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAEpI,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC;YACvD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iCAAiC,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMacAddress.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js b/src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js new file mode 100644 index 0000000..86e5932 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_MAGNET_URI = "isMagnetURI"; +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +export function isMagnetURI(value) { + return typeof value === "string" && validator.isMagnetURI(value); +} +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +export function IsMagnetURI(validationOptions) { + return ValidateBy({ + name: IS_MAGNET_URI, + validator: { + validate: (value, args) => isMagnetURI(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be magnet uri format", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMagnetURI.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js.map new file mode 100644 index 0000000..c2c34d7 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMagnetURI.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMagnetURI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,qCAAqC,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMagnetURI.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js b/src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js new file mode 100644 index 0000000..2c87651 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_MILITARY_TIME = "isMilitaryTime"; +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +export function isMilitaryTime(value) { + const militaryTimeRegex = /^([01]\d|2[0-3]):?([0-5]\d)$/; + return typeof value === "string" && validator.matches(value, militaryTimeRegex); +} +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +export function IsMilitaryTime(validationOptions) { + return ValidateBy({ + name: IS_MILITARY_TIME, + validator: { + validate: (value, args) => isMilitaryTime(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid representation of military time in the format HH:MM", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMilitaryTime.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js.map new file mode 100644 index 0000000..f607fba --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMilitaryTime.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMilitaryTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IACzC,MAAM,iBAAiB,GAAG,8BAA8B,CAAC;IACzD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,iBAAqC;IAChE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC;YAChD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+EAA+E,EAC5G,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMilitaryTime.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js b/src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js new file mode 100644 index 0000000..18afb62 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_MIME_TYPE = "isMimeType"; +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +export function isMimeType(value) { + return typeof value === "string" && validator.isMimeType(value); +} +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +export function IsMimeType(validationOptions) { + return ValidateBy({ + name: IS_MIME_TYPE, + validator: { + validate: (value, args) => isMimeType(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be MIME type format", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMimeType.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js.map new file mode 100644 index 0000000..ddbdc12 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMimeType.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMimeType.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;YAC5C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,oCAAoC,EACjE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMimeType.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js b/src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js new file mode 100644 index 0000000..9fa1ffe --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js @@ -0,0 +1,42 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_MOBILE_PHONE = "isMobilePhone"; +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +export function isMobilePhone(value, locale, options) { + return typeof value === "string" && validator.isMobilePhone(value, locale, options); +} +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +export function IsMobilePhone(locale, options, validationOptions) { + return ValidateBy({ + name: IS_MOBILE_PHONE, + constraints: [locale, options], + validator: { + validate: (value, args) => isMobilePhone(value, args.constraints[0], args.constraints[1]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a phone number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMobilePhone.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js.map new file mode 100644 index 0000000..3a54aef --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMobilePhone.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMobilePhone.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,MAAoC,EAAE,OAAwC;IACxH,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACxF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,MAAoC,EAAE,OAAwC,EAAE,iBAAqC;IAC/I,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QAC9B,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACzF,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,kCAAkC,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMobilePhone.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js b/src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js new file mode 100644 index 0000000..c8f97ce --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_MONGO_ID = "isMongoId"; +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +export function isMongoId(value) { + return typeof value === "string" && validator.isMongoId(value); +} +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +export function IsMongoId(validationOptions) { + return ValidateBy({ + name: IS_MONGO_ID, + validator: { + validate: (value, args) => isMongoId(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a mongodb id", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMongoId.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js.map new file mode 100644 index 0000000..064d721 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMongoId.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMongoId.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;YAC3C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,gCAAgC,EAC7D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMongoId.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js b/src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js new file mode 100644 index 0000000..b6856d5 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_MULTIBYTE = "isMultibyte"; +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +export function isMultibyte(value) { + return typeof value === "string" && validator.isMultibyte(value); +} +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +export function IsMultibyte(validationOptions) { + return ValidateBy({ + name: IS_MULTIBYTE, + validator: { + validate: (value, args) => isMultibyte(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain one or more multibyte chars", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMultibyte.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js.map new file mode 100644 index 0000000..75e4d45 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsMultibyte.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMultibyte.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,oDAAoD,EACjF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMultibyte.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js b/src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js new file mode 100644 index 0000000..4c4b3f0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_NUMBER_STRING = "isNumberString"; +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +export function isNumberString(value, options) { + return typeof value === "string" && ValidatorJS.isNumeric(value, options); +} +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +export function IsNumberString(options, validationOptions) { + return ValidateBy({ + name: IS_NUMBER_STRING, + constraints: [options], + validator: { + validate: (value, args) => isNumberString(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a number string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNumberString.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js.map new file mode 100644 index 0000000..ec2bc9f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsNumberString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsNumberString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,OAAsC;IACjF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAsC,EAAE,iBAAqC;IACxG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACrE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,mCAAmC,EAChE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNumberString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js b/src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js new file mode 100644 index 0000000..23dc8d6 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_OCTAL = "isOctal"; +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +export function isOctal(value) { + return typeof value === "string" && validator.isOctal(value); +} +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +export function IsOctal(validationOptions) { + return ValidateBy({ + name: IS_OCTAL, + validator: { + validate: (value, args) => isOctal(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be valid octal number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsOctal.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js.map new file mode 100644 index 0000000..0fb3173 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsOctal.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsOctal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;YACzC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,sCAAsC,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsOctal.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js b/src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js new file mode 100644 index 0000000..30f8e14 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_PASSPORT_NUMBER = "isPassportNumber"; +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +export function isPassportNumber(value, countryCode) { + return typeof value === "string" && validator.isPassportNumber(value, countryCode); +} +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +export function IsPassportNumber(countryCode, validationOptions) { + return ValidateBy({ + name: IS_PASSPORT_NUMBER, + constraints: [countryCode], + validator: { + validate: (value, args) => isPassportNumber(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be valid passport number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPassportNumber.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js.map new file mode 100644 index 0000000..4a3d16f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPassportNumber.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPassportNumber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,WAAmB;IAChE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACvF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB,EAAE,iBAAqC;IACvF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,CAAC,WAAW,CAAC;QAC1B,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACvE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,yCAAyC,EACtE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPassportNumber.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js b/src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js new file mode 100644 index 0000000..32b1ea1 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js @@ -0,0 +1,40 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import { PhoneNumberUtil } from "google-libphonenumber"; +export const IS_PHONE_NUMBER = "isPhoneNumber"; +/** + * Checks if the string is a valid phone number. + * @param value the potential phone number string to test + * @param {string} region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +export function isPhoneNumber(value, region) { + const phoneUtil = PhoneNumberUtil.getInstance(); + try { + const phoneNum = phoneUtil.parseAndKeepRawInput(value, region); + const result = phoneUtil.isValidNumber(phoneNum); + return result; + } + catch (error) { + // logging? + return false; + } +} +/** + * Checks if the string is a valid phone number. + * @param region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +export function IsPhoneNumber(region, validationOptions) { + return ValidateBy({ + name: IS_PHONE_NUMBER, + constraints: [region], + validator: { + validate: (value, args) => isPhoneNumber(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid phone number", validationOptions), + } + }, validationOptions); +} + +//# sourceMappingURL=IsPhoneNumber.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js.map new file mode 100644 index 0000000..d0abf19 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPhoneNumber.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPhoneNumber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,MAAqB;IAC9D,MAAM,SAAS,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;IAChD,IAAI;QACA,MAAM,QAAQ,GAAG,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjD,OAAO,MAAM,CAAC;KACjB;IAAC,OAAO,KAAK,EAAE;QACZ,WAAW;QACX,OAAO,KAAK,CAAC;KAChB;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,iBAAqC;IACtF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACpE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,wCAAwC,EACrE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPhoneNumber.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPort.js b/src/node_modules/class-validator/esm2015/decorator/string/IsPort.js new file mode 100644 index 0000000..fc6025e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPort.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_PORT = "isPort"; +/** + * Check if the string is a valid port number. + */ +export function isPort(value) { + return typeof value === "string" && validator.isPort(value); +} +/** + * Check if the string is a valid port number. + */ +export function IsPort(validationOptions) { + return ValidateBy({ + name: IS_PORT, + validator: { + validate: (value, args) => isPort(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a port", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPort.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPort.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsPort.js.map new file mode 100644 index 0000000..2580a8e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPort.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPort.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,0BAA0B,EACvD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPort.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js b/src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js new file mode 100644 index 0000000..ce6fda8 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_POSTAL_CODE = "isPostalCode"; +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +export function isPostalCode(value, locale) { + return typeof value === "string" && validator.isPostalCode(value, locale); +} +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +export function IsPostalCode(locale, validationOptions) { + return ValidateBy({ + name: IS_POSTAL_CODE, + constraints: [locale], + validator: { + validate: (value, args) => isPostalCode(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a postal code", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPostalCode.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js.map new file mode 100644 index 0000000..48757f9 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsPostalCode.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPostalCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,MAAkC;IAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAAmC,EAAE,iBAAqC;IACnG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACnE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iCAAiC,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPostalCode.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js b/src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js new file mode 100644 index 0000000..79dd88f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_RFC_3339 = "isRFC3339"; +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +export function isRFC3339(value) { + return typeof value === "string" && validator.isRFC3339(value); +} +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +export function IsRFC3339(validationOptions) { + return ValidateBy({ + name: IS_RFC_3339, + validator: { + validate: (value, args) => isRFC3339(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be RFC 3339 date", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsRFC3339.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js.map new file mode 100644 index 0000000..4c6e103 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsRFC3339.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsRFC3339.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;YAC3C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,iCAAiC,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsRFC3339.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js b/src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js new file mode 100644 index 0000000..3c47901 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_RGB_COLOR = "isRgbColor"; +/** +* Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +export function isRgbColor(value, includePercentValues) { + return typeof value === "string" && validator.isRgbColor(value, includePercentValues); +} +/** + * Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +export function IsRgbColor(includePercentValues, validationOptions) { + return ValidateBy({ + name: IS_RGB_COLOR, + constraints: [includePercentValues], + validator: { + validate: (value, args) => isRgbColor(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be RGB color", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsRgbColor.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js.map new file mode 100644 index 0000000..117fb94 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsRgbColor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsRgbColor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc,EAAE,oBAA8B;IACrE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC;AAC1F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,oBAA8B,EAAE,iBAAqC;IAC5F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,CAAC,oBAAoB,CAAC;QACnC,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACjE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,6BAA6B,EAC1D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsRgbColor.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js b/src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js new file mode 100644 index 0000000..a5c5d73 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_SEM_VER = "isSemVer"; +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +export function isSemVer(value) { + return typeof value === "string" && validator.isSemVer(value); +} +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +export function IsSemVer(validationOptions) { + return ValidateBy({ + name: IS_SEM_VER, + validator: { + validate: (value, args) => isSemVer(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a Semantic Versioning Specification", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsSemVer.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js.map new file mode 100644 index 0000000..7a41fa6 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsSemVer.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsSemVer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;AAErC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,uDAAuD,EACpF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsSemVer.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js b/src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js new file mode 100644 index 0000000..2f70a5c --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_SURROGATE_PAIR = "isSurrogatePair"; +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +export function isSurrogatePair(value) { + return typeof value === "string" && validator.isSurrogatePair(value); +} +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +export function IsSurrogatePair(validationOptions) { + return ValidateBy({ + name: IS_SURROGATE_PAIR, + validator: { + validate: (value, args) => isSurrogatePair(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain any surrogate pairs chars", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsSurrogatePair.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js.map new file mode 100644 index 0000000..c0ef995 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsSurrogatePair.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsSurrogatePair.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;YACjD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,kDAAkD,EAC/E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsSurrogatePair.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js b/src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js new file mode 100644 index 0000000..18bb10b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_UUID = "isUuid"; +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +export function isUUID(value, version) { + return typeof value === "string" && validator.isUUID(value, version); +} +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +export function IsUUID(version, validationOptions) { + return ValidateBy({ + name: IS_UUID, + constraints: [version], + validator: { + validate: (value, args) => isUUID(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an UUID", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsUUID.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js.map new file mode 100644 index 0000000..edb892e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsUUID.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsUUID.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAqB;IACxD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAqB,EAAE,iBAAqC;IAC/E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,2BAA2B,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsUUID.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js b/src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js new file mode 100644 index 0000000..f51c2fd --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_UPPERCASE = "isUppercase"; +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +export function isUppercase(value) { + return typeof value === "string" && validator.isUppercase(value); +} +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +export function IsUppercase(validationOptions) { + return ValidateBy({ + name: IS_UPPERCASE, + validator: { + validate: (value, args) => isUppercase(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be uppercase", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsUppercase.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js.map new file mode 100644 index 0000000..cae2170 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsUppercase.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsUppercase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;YAC7C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,6BAA6B,EAC1D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsUppercase.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js b/src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js new file mode 100644 index 0000000..6d90f75 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export const IS_URL = "isUrl"; +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +export function isURL(value, options) { + return typeof value === "string" && ValidatorJS.isURL(value, options); +} +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +export function IsUrl(options, validationOptions) { + return ValidateBy({ + name: IS_URL, + constraints: [options], + validator: { + validate: (value, args) => isURL(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an URL address", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsUrl.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js.map new file mode 100644 index 0000000..793dae0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsUrl.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,OAAkC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,OAAkC,EAAE,iBAAqC;IAC3F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC5D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,kCAAkC,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsUrl.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js b/src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js new file mode 100644 index 0000000..c2b360e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const IS_VARIABLE_WIDTH = "isVariableWidth"; +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +export function isVariableWidth(value) { + return typeof value === "string" && validator.isVariableWidth(value); +} +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +export function IsVariableWidth(validationOptions) { + return ValidateBy({ + name: IS_VARIABLE_WIDTH, + validator: { + validate: (value, args) => isVariableWidth(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must contain a full-width and half-width characters", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsVariableWidth.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js.map b/src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js.map new file mode 100644 index 0000000..36889af --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/IsVariableWidth.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsVariableWidth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;YACjD,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,+DAA+D,EAC5F,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsVariableWidth.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/Length.js b/src/node_modules/class-validator/esm2015/decorator/string/Length.js new file mode 100644 index 0000000..78413d2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/Length.js @@ -0,0 +1,36 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const LENGTH = "length"; +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function length(value, min, max) { + return typeof value === "string" && validator.isLength(value, { min, max }); +} +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function Length(min, max, validationOptions) { + return ValidateBy({ + name: LENGTH, + constraints: [min, max], + validator: { + validate: (value, args) => length(value, args.constraints[0], args.constraints[1]), + defaultMessage: buildMessage((eachPrefix, args) => { + const isMinLength = args.constraints[0] !== null && args.constraints[0] !== undefined; + const isMaxLength = args.constraints[1] !== null && args.constraints[1] !== undefined; + if (isMinLength && (!args.value || args.value.length < args.constraints[0])) { + return eachPrefix + "$property must be longer than or equal to $constraint1 characters"; + } + else if (isMaxLength && (args.value.length > args.constraints[1])) { + return eachPrefix + "$property must be shorter than or equal to $constraint2 characters"; + } + return eachPrefix + "$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"; + }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Length.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/Length.js.map b/src/node_modules/class-validator/esm2015/decorator/string/Length.js.map new file mode 100644 index 0000000..55f8469 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/Length.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/Length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM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C,CAAC,EAAE;oBACjE,OAAO,UAAU,GAAG,oEAAoE,CAAC;iBAC5F;gBACD,OAAO,UAAU,GAAG,6GAA6G,CAAC;YACtI,CAAC,EACD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Length.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/Matches.js b/src/node_modules/class-validator/esm2015/decorator/string/Matches.js new file mode 100644 index 0000000..67dc873 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/Matches.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const MATCHES = "matches"; +export function matches(value, pattern, modifiers) { + return typeof value === "string" && validator.matches(value, pattern, modifiers); +} +export function Matches(pattern, modifiersOrAnnotationOptions, validationOptions) { + let modifiers; + if (modifiersOrAnnotationOptions && modifiersOrAnnotationOptions instanceof Object && !validationOptions) { + validationOptions = modifiersOrAnnotationOptions; + } + else { + modifiers = modifiersOrAnnotationOptions; + } + return ValidateBy({ + name: MATCHES, + constraints: [pattern, modifiers], + validator: { + validate: (value, args) => matches(value, args.constraints[0], args.constraints[0]), + defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + "$property must match $constraint1 regular expression", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Matches.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/Matches.js.map b/src/node_modules/class-validator/esm2015/decorator/string/Matches.js.map new file mode 100644 index 0000000..fd3a3f1 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/Matches.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/Matches.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AAQjC,MAAM,UAAU,OAAO,CAAC,KAAa,EAAE,OAAwB,EAAE,SAAkB;IAC/E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,OAAyB,EAAE,SAAS,CAAC,CAAC;AACvG,CAAC;AAQD,MAAM,UAAU,OAAO,CAAC,OAAwB,EAAE,4BAAyD,EAAE,iBAAqC;IAC9I,IAAI,SAAiB,CAAC;IACtB,IAAI,4BAA4B,IAAI,4BAA4B,YAAY,MAAM,IAAI,CAAC,iBAAiB,EAAE;QACtG,iBAAiB,GAAG,4BAAiD,CAAC;KACzE;SAAM;QACH,SAAS,GAAG,4BAAsC,CAAC;KACtD;IAED,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;QACjC,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YACnF,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,UAAU,GAAG,sDAAsD,EACzF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Matches.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js b/src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js new file mode 100644 index 0000000..a786e3d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const MAX_LENGTH = "maxLength"; +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function maxLength(value, max) { + return typeof value === "string" && validator.isLength(value, { min: 0, max }); +} +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function MaxLength(max, validationOptions) { + return ValidateBy({ + name: MAX_LENGTH, + constraints: [max], + validator: { + validate: (value, args) => maxLength(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be shorter than or equal to $constraint1 characters", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MaxLength.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js.map b/src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js.map new file mode 100644 index 0000000..1bbece4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/MaxLength.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/MaxLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,GAAW;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;AACnF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAChE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,oEAAoE,EACjG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MaxLength.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/MinLength.js b/src/node_modules/class-validator/esm2015/decorator/string/MinLength.js new file mode 100644 index 0000000..06d6a27 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/MinLength.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const MIN_LENGTH = "minLength"; +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function minLength(value, min) { + return typeof value === "string" && validator.isLength(value, { min }); +} +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function MinLength(min, validationOptions) { + return ValidateBy({ + name: MIN_LENGTH, + constraints: [min], + validator: { + validate: (value, args) => minLength(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be longer than or equal to $constraint1 characters", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MinLength.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/MinLength.js.map b/src/node_modules/class-validator/esm2015/decorator/string/MinLength.js.map new file mode 100644 index 0000000..e913ee1 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/MinLength.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/MinLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,GAAW;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAChE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,mEAAmE,EAChG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MinLength.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/string/NotContains.js b/src/node_modules/class-validator/esm2015/decorator/string/NotContains.js new file mode 100644 index 0000000..b88032d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/NotContains.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export const NOT_CONTAINS = "notContains"; +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +export function notContains(value, seed) { + return typeof value === "string" && !validator.contains(value, seed); +} +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +export function NotContains(seed, validationOptions) { + return ValidateBy({ + name: NOT_CONTAINS, + constraints: [seed], + validator: { + validate: (value, args) => notContains(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property should not contain a $constraint1 string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=NotContains.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/string/NotContains.js.map b/src/node_modules/class-validator/esm2015/decorator/string/NotContains.js.map new file mode 100644 index 0000000..786e4ae --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/string/NotContains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/NotContains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc,EAAE,IAAY;IACpD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAClE,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,oDAAoD,EACjF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"NotContains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js new file mode 100644 index 0000000..7210494 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_ARRAY = "isArray"; +/** + * Checks if a given value is an array + */ +export function isArray(value) { + return value instanceof Array; +} +/** + * Checks if a given value is an array + */ +export function IsArray(validationOptions) { + return ValidateBy({ + name: IS_ARRAY, + validator: { + validate: (value, args) => isArray(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an array", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsArray.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js.map new file mode 100644 index 0000000..c74eff2 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsArray.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsArray.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;YACzC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,4BAA4B,EACzD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsArray.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js new file mode 100644 index 0000000..6be1ebd --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_BOOLEAN = "isBoolean"; +/** + * Checks if a given value is a number. + */ +export function isBoolean(value) { + return value instanceof Boolean || typeof value === "boolean"; +} +/** + * Checks if a value is a number. + */ +export function IsBoolean(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN, + validator: { + validate: (value, args) => isBoolean(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a boolean value", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBoolean.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js.map new file mode 100644 index 0000000..84c9102 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsBoolean.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsBoolean.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,OAAO,IAAI,OAAO,KAAK,KAAK,SAAS,CAAC;AAClE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;YAC3C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,mCAAmC,EAChE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBoolean.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js new file mode 100644 index 0000000..fd6ff52 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_DATE = "isDate"; +/** + * Checks if a given value is a number. + */ +export function isDate(value) { + return value instanceof Date && !isNaN(value.getTime()); +} +/** + * Checks if a value is a number. + */ +export function IsDate(validationOptions) { + return ValidateBy({ + name: IS_DATE, + validator: { + validate: (value, args) => isDate(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a Date instance", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDate.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js.map new file mode 100644 index 0000000..26d0525 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsDate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC;YACxC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,mCAAmC,EAChE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js new file mode 100644 index 0000000..aa849f4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_ENUM = "isEnum"; +/** + * Checks if a given value is an enum + */ +export function isEnum(value, entity) { + const enumValues = Object.keys(entity) + .map(k => entity[k]); + return enumValues.indexOf(value) >= 0; +} +/** + * Checks if a given value is an enum + */ +export function IsEnum(entity, validationOptions) { + return ValidateBy({ + name: IS_ENUM, + constraints: [entity], + validator: { + validate: (value, args) => isEnum(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a valid enum value", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEnum.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js.map new file mode 100644 index 0000000..13fb851 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsEnum.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsEnum.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,MAAW;IAC9C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SACjC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,MAAc,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC7D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,sCAAsC,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEnum.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js new file mode 100644 index 0000000..42c58bb --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_INT = "isInt"; +/** + * Checks if value is an integer. + */ +export function isInt(val) { + return typeof val === "number" && Number.isInteger(val); +} +/** + * Checks if value is an integer. + */ +export function IsInt(validationOptions) { + return ValidateBy({ + name: IS_INT, + validator: { + validate: (value, args) => isInt(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an integer number", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsInt.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js.map new file mode 100644 index 0000000..414a4bf --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsInt.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsInt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY;IAC9B,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACvC,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,qCAAqC,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsInt.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js new file mode 100644 index 0000000..323f351 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js @@ -0,0 +1,41 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_NUMBER = "isNumber"; +/** + * Checks if a given value is a number. + */ +export function isNumber(value, options = {}) { + if (typeof value !== "number") { + return false; + } + if (value === Infinity || value === -Infinity) { + return options.allowInfinity; + } + if (Number.isNaN(value)) { + return options.allowNaN; + } + if (options.maxDecimalPlaces !== undefined) { + let decimalPlaces = 0; + if ((value % 1) !== 0) { + decimalPlaces = value.toString().split(".")[1].length; + } + if (decimalPlaces > options.maxDecimalPlaces) { + return false; + } + } + return Number.isFinite(value); +} +/** + * Checks if a value is a number. + */ +export function IsNumber(options = {}, validationOptions) { + return ValidateBy({ + name: IS_NUMBER, + constraints: [options], + validator: { + validate: (value, args) => isNumber(value, args.constraints[0]), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a number conforming to the specified constraints", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNumber.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js.map new file mode 100644 index 0000000..07c621e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsNumber.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsNumber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAWpC;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc,EAAE,UAA2B,EAAE;IAClE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC3B,OAAO,KAAK,CAAC;KAChB;IAED,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE;QAC3C,OAAO,OAAO,CAAC,aAAa,CAAC;KAChC;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACrB,OAAO,OAAO,CAAC,QAAQ,CAAC;KAC3B;IAED,IAAI,OAAO,CAAC,gBAAgB,KAAK,SAAS,EAAE;QACxC,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE;YACnB,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;SACzD;QACD,IAAI,aAAa,GAAG,OAAO,CAAC,gBAAgB,EAAE;YAC1C,OAAO,KAAK,CAAC;SAChB;KACJ;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,UAA2B,EAAE,EAAE,iBAAqC;IACzF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAC/D,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,oEAAoE,EACjG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNumber.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js new file mode 100644 index 0000000..b1695f8 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js @@ -0,0 +1,24 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_OBJECT = "isObject"; +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +export function isObject(value) { + return value != null && (typeof value === "object" || typeof value === "function") && !Array.isArray(value); +} +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +export function IsObject(validationOptions) { + return ValidateBy({ + name: IS_OBJECT, + validator: { + validate: (value, args) => isObject(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be an object", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsObject.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js.map new file mode 100644 index 0000000..64f4ed5 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsObject.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,6BAA6B,EAC1D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsObject.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js new file mode 100644 index 0000000..c6c9af1 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export const IS_STRING = "isString"; +/** +* Checks if a given value is a real string. +*/ +export function isString(value) { + return value instanceof String || typeof value === "string"; +} +/** +* Checks if a given value is a real string. +*/ +export function IsString(validationOptions) { + return ValidateBy({ + name: IS_STRING, + validator: { + validate: (value, args) => isString(value), + defaultMessage: buildMessage((eachPrefix) => eachPrefix + "$property must be a string", validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsString.js.map diff --git a/src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js.map b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js.map new file mode 100644 index 0000000..04506bb --- /dev/null +++ b/src/node_modules/class-validator/esm2015/decorator/typechecker/IsString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;EAEE;AACF,MAAM,UAAU,QAAQ,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,MAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AAC/D,CAAC;AAED;;EAEE;AACF,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1C,cAAc,EAAE,YAAY,CACxB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,4BAA4B,EACzD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/index.js b/src/node_modules/class-validator/esm2015/index.js new file mode 100644 index 0000000..dceef7a --- /dev/null +++ b/src/node_modules/class-validator/esm2015/index.js @@ -0,0 +1,57 @@ +import { getMetadataStorage } from "./metadata/MetadataStorage"; +import { Validator } from "./validation/Validator"; +import { getFromContainer } from "./container"; +// ------------------------------------------------------------------------- +// Export everything api users needs +// ------------------------------------------------------------------------- +export * from "./container"; +export * from "./decorator/decorators"; +export * from "./decorator/ValidationOptions"; +export * from "./validation/ValidationError"; +export * from "./validation/ValidationTypes"; +export * from "./validation/Validator"; +export * from "./register-decorator"; +export * from "./metadata/MetadataStorage"; +/** + * Validates given object by object's decorators or given validation schema. + */ +export function validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Validates given object by object's decorators or given validation schema and reject on error. + */ +export function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Validates given object by object's decorators or given validation schema. + * Note that this method completely ignores async validations. + * If you want to properly perform validation you need to call validate method instead. + */ +export function validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Registers a new validation schema. + */ +export function registerSchema(schema) { + getMetadataStorage().addValidationSchema(schema); +} + +//# sourceMappingURL=index.js.map diff --git a/src/node_modules/class-validator/esm2015/index.js.map b/src/node_modules/class-validator/esm2015/index.js.map new file mode 100644 index 0000000..b4c2c74 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAE7C,4EAA4E;AAC5E,oCAAoC;AACpC,4EAA4E;AAE5E,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAE9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U,cAAc,CAAC,MAAwB;IACnD,kBAAkB,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC","file":"index.js","sourcesContent":["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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js b/src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js new file mode 100644 index 0000000..3355372 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js @@ -0,0 +1,25 @@ +import { getFromContainer } from "../container"; +/** + * This metadata interface contains information for custom validators. + */ +export class ConstraintMetadata { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(target, name, async = false) { + this.target = target; + this.name = name; + this.async = async; + } + // ------------------------------------------------------------------------- + // Accessors + // ------------------------------------------------------------------------- + /** + * Instance of the target custom validation class which performs validation. + */ + get instance() { + return getFromContainer(this.target); + } +} + +//# sourceMappingURL=ConstraintMetadata.js.map diff --git a/src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js.map b/src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js.map new file mode 100644 index 0000000..3f0f790 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/ConstraintMetadata.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/metadata/ConstraintMetadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAqB3B,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAE5E,YAAY,MAAgB,EAAE,IAAa,EAAE,QAAiB,KAAK;QAC/D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,4EAA4E;IAC5E,YAAY;IACZ,4EAA4E;IAE5E;;OAEG;IACH,IAAI,QAAQ;QACR,OAAO,gBAAgB,CAA+B,IAAI,CAAC,MAAM,CAAC,CAAC;IACvE,CAAC;CAEJ","file":"ConstraintMetadata.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js b/src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js new file mode 100644 index 0000000..ef1387e --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js @@ -0,0 +1,109 @@ +import { ValidationSchemaToMetadataTransformer } from "../validation-schema/ValidationSchemaToMetadataTransformer"; +/** + * Gets metadata storage. + * Metadata storage follows the best practices and stores metadata in a global variable. + */ +export function getMetadataStorage() { + if (typeof window !== "undefined") { + window.global = window; + } + if (!global.classValidatorMetadataStorage) + global.classValidatorMetadataStorage = new MetadataStorage(); + return global.classValidatorMetadataStorage; +} +/** + * Storage all metadatas. + */ +export class MetadataStorage { + constructor() { + // ------------------------------------------------------------------------- + // Private properties + // ------------------------------------------------------------------------- + this.validationMetadatas = []; + this.constraintMetadatas = []; + } + get hasValidationMetaData() { + return !!this.validationMetadatas.length; + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + /** + * Adds a new validation metadata. + */ + addValidationSchema(schema) { + const validationMetadatas = new ValidationSchemaToMetadataTransformer().transform(schema); + validationMetadatas.forEach(validationMetadata => this.addValidationMetadata(validationMetadata)); + } + /** + * Adds a new validation metadata. + */ + addValidationMetadata(metadata) { + this.validationMetadatas.push(metadata); + } + /** + * Adds a new constraint metadata. + */ + addConstraintMetadata(metadata) { + this.constraintMetadatas.push(metadata); + } + /** + * Groups metadata by their property names. + */ + groupByPropertyName(metadata) { + const grouped = {}; + metadata.forEach(metadata => { + if (!grouped[metadata.propertyName]) + grouped[metadata.propertyName] = []; + grouped[metadata.propertyName].push(metadata); + }); + return grouped; + } + /** + * Gets all validation metadatas for the given object with the given groups. + */ + getTargetValidationMetadatas(targetConstructor, targetSchema, groups) { + // get directly related to a target metadatas + const originalMetadatas = this.validationMetadatas.filter(metadata => { + if (metadata.target !== targetConstructor && metadata.target !== targetSchema) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(group => groups.indexOf(group) !== -1); + return true; + }); + // get metadatas for inherited classes + const inheritedMetadatas = this.validationMetadatas.filter(metadata => { + // if target is a string it's means we validate agains a schema, and there is no inheritance support for schemas + if (typeof metadata.target === "string") + return false; + if (metadata.target === targetConstructor) + return false; + if (metadata.target instanceof Function && + !(targetConstructor.prototype instanceof metadata.target)) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(group => groups.indexOf(group) !== -1); + return true; + }); + // filter out duplicate metadatas, prefer original metadatas instead of inherited metadatas + const uniqueInheritedMetadatas = inheritedMetadatas.filter(inheritedMetadata => { + return !originalMetadatas.find(originalMetadata => { + return originalMetadata.propertyName === inheritedMetadata.propertyName && + originalMetadata.type === inheritedMetadata.type; + }); + }); + return originalMetadatas.concat(uniqueInheritedMetadatas); + } + /** + * Gets all validator constraints for the given object. + */ + getTargetValidatorConstraints(target) { + return this.constraintMetadatas.filter(metadata => metadata.target === target); + } +} + +//# sourceMappingURL=MetadataStorage.js.map diff --git a/src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js.map b/src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js.map new file mode 100644 index 0000000..f61c2f1 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/MetadataStorage.js.map @@ -0,0 +1 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AAC,MAAM,YAAY,QAAQ;gBACnC,CAAC,CAAC,iBAAiB,CAAC,SAAS,YAAa,QAAQ,CAAC,MAAmB,CAAC;gBACvE,OAAO,KAAK,CAAC;YACjB,IAAI,QAAQ,CAAC,MAAM;gBACf,OAAO,IAAI,CAAC;YAChB,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;gBAC3B,OAAO,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE5F,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,2FAA2F;QAC3F,MAAM,wBAAwB,GAAG,kBAAkB,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE;YAC3E,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE;gBAC9C,OAAQ,gBAAgB,CAAC,YAAY,KAAK,iBAAiB,CAAC,YAAY;oBAChE,gBAAgB,CAAC,IAAI,KAAK,iBAAiB,CAAC,IAAI,CAAC;YAC7D,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,6BAA6B,CAAC,MAAgB;QAC1C,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;IACnF,CAAC;CAEJ","file":"MetadataStorage.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js new file mode 100644 index 0000000..975ee32 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js @@ -0,0 +1,41 @@ +/** + * This metadata contains validation rules. + */ +export class ValidationMetadata { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(args) { + /** + * Validation groups used for this validation. + */ + this.groups = []; + /** + * Indicates if validation must be performed always, no matter of validation groups used. + */ + this.always = false; + /** + * Specifies if validated value is an array and each of its item must be validated. + */ + this.each = false; + /* + * A transient set of data passed through to the validation result for response mapping + */ + this.context = undefined; + this.type = args.type; + this.target = args.target; + this.propertyName = args.propertyName; + this.constraints = args.constraints; + this.constraintCls = args.constraintCls; + this.validationTypeOptions = args.validationTypeOptions; + if (args.validationOptions) { + this.message = args.validationOptions.message; + this.groups = args.validationOptions.groups; + this.always = args.validationOptions.always; + this.each = args.validationOptions.each; + this.context = args.validationOptions.context; + } + } +} + +//# sourceMappingURL=ValidationMetadata.js.map diff --git a/src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js.map b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js.map new file mode 100644 index 0000000..b5ad382 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadata.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/metadata/ValidationMetadata.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,OAAO,kBAAkB;IA6D3B,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAE5E,YAAY,IAA4B;QA7BxC;;WAEG;QACH,WAAM,GAAa,EAAE,CAAC;QAEtB;;WAEG;QACH,WAAM,GAAY,KAAK,CAAC;QAExB;;WAEG;QACH,SAAI,GAAY,KAAK,CAAC;QAEtB;;WAEG;QACH,YAAO,GAAS,SAAS,CAAC;QAYtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;QACxD,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;YAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;YAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;SACjD;IACL,CAAC;CAEJ","file":"ValidationMetadata.js","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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js new file mode 100644 index 0000000..aa93419 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidationMetadataArgs.js.map diff --git a/src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js.map b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js.map new file mode 100644 index 0000000..2803afc --- /dev/null +++ b/src/node_modules/class-validator/esm2015/metadata/ValidationMetadataArgs.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/metadata/ValidationMetadataArgs.ts"],"names":[],"mappings":"","file":"ValidationMetadataArgs.js","sourcesContent":["import {ValidationOptions} from \"../decorator/ValidationOptions\";\n\n/**\n * Constructor arguments for ValidationMetadata class.\n */\nexport interface ValidationMetadataArgs {\n\n /**\n * Validation type.\n */\n type: string;\n\n /**\n * Object that is used to be validated.\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 options.\n */\n validationOptions?: ValidationOptions;\n\n /**\n * Extra options specific to validation type.\n */\n validationTypeOptions?: any;\n}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/register-decorator.js b/src/node_modules/class-validator/esm2015/register-decorator.js new file mode 100644 index 0000000..394518f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/register-decorator.js @@ -0,0 +1,44 @@ +import { ConstraintMetadata } from "./metadata/ConstraintMetadata"; +import { ValidationMetadata } from "./metadata/ValidationMetadata"; +import { ValidationTypes } from "./validation/ValidationTypes"; +import { getFromContainer } from "./container"; +import { MetadataStorage, getMetadataStorage } from "./metadata/MetadataStorage"; +/** + * Registers a custom validation decorator. + */ +export function registerDecorator(options) { + let constraintCls; + if (options.validator instanceof Function) { + constraintCls = options.validator; + const constraintClasses = getFromContainer(MetadataStorage).getTargetValidatorConstraints(options.validator); + if (constraintClasses.length > 1) { + throw `More than one implementation of ValidatorConstraintInterface found for validator on: ${options.target}:${options.propertyName}`; + } + } + else { + const validator = options.validator; + constraintCls = class CustomConstraint { + validate(value, validationArguments) { + return validator.validate(value, validationArguments); + } + defaultMessage(validationArguments) { + if (validator.defaultMessage) { + return validator.defaultMessage(validationArguments); + } + return ""; + } + }; + getMetadataStorage().addConstraintMetadata(new ConstraintMetadata(constraintCls, options.name, options.async)); + } + const validationMetadataArgs = { + type: options.name && ValidationTypes.isValid(options.name) ? options.name : ValidationTypes.CUSTOM_VALIDATION, + target: options.target, + propertyName: options.propertyName, + validationOptions: options.options, + constraintCls: constraintCls, + constraints: options.constraints + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(validationMetadataArgs)); +} + +//# sourceMappingURL=register-decorator.js.map diff --git a/src/node_modules/class-validator/esm2015/register-decorator.js.map b/src/node_modules/class-validator/esm2015/register-decorator.js.map new file mode 100644 index 0000000..6a77d05 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/register-decorator.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/register-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAyCjF;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAmC;IAEjE,IAAI,aAAuB,CAAC;IAC5B,IAAI,OAAO,CAAC,SAAS,YAAY,QA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qB,CAAC,IAAI,kBAAkB,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAC/F,CAAC","file":"register-decorator.js","sourcesContent":["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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/utils.js b/src/node_modules/class-validator/esm2015/utils.js new file mode 100644 index 0000000..e205866 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/utils.js @@ -0,0 +1,15 @@ +// https://github.com/TylorS/typed-is-promise/blob/abf1514e1b6961adfc75765476b0debb96b2c3ae/src/index.ts +export function isPromise(p) { + return p !== null && typeof p === "object" && typeof p.then === "function"; +} +/** + * Convert Map, Set to Array + */ +export function convertToArray(val) { + if (val instanceof Map) { + return Array.from(val.values()); + } + return Array.isArray(val) ? val : Array.from(val); +} + +//# sourceMappingURL=utils.js.map diff --git a/src/node_modules/class-validator/esm2015/utils.js.map b/src/node_modules/class-validator/esm2015/utils.js.map new file mode 100644 index 0000000..fc34ba7 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/utils.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,wGAAwG;AAExG,MAAM,UAAU,SAAS,CAAU,CAAM;IACrC,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAI,GAAoC;IAClE,IAAI,GAAG,YAAY,GAAG,EAAE;QACpB,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;KACnC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtD,CAAC","file":"utils.js","sourcesContent":["// 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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js new file mode 100644 index 0000000..60ea31c --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidationSchema.js.map diff --git a/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js.map b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js.map new file mode 100644 index 0000000..94911ef --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchema.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation-schema/ValidationSchema.ts"],"names":[],"mappings":"","file":"ValidationSchema.js","sourcesContent":["/**\n * Validation schema is a decorator-free way of validation of your objects.\n * Also using validation schemas makes this library to be easily used with es6/es5.\n */\nexport interface ValidationSchema {\n\n /**\n * Schema name. This is required, because we tell validator to validate by this schema using its name.\n */\n name: string;\n\n /**\n * Validated properties.\n */\n properties: {\n\n /**\n * Name of the object's property to be validated which holds an array of validation constraints.\n */\n [propertyName: string]: {\n\n /**\n * Validation type. Should be one of the ValidationTypes value.\n */\n type: string;\n\n /**\n * Constraints set by validation type.\n */\n constraints?: any[];\n\n /**\n * Error message used to be used on validation fail.\n * You can use \"$value\" to use value that was failed by validation.\n * You can use \"$constraint1\" and \"$constraint2\" keys in the message string,\n * and they will be replaced with constraint values if they exist.\n * Message can be either string, either a function that returns a string.\n * Second option allows to use values and custom messages depend of them.\n */\n message?: string|((value?: any, constraint1?: any, constraint2?: any) => string);\n\n /**\n * Specifies if validated value is an array and each of its item must be validated.\n */\n each?: boolean;\n\n /**\n * Indicates if validation must be performed always, no matter of validation groups used.\n */\n always?: boolean;\n\n /**\n * Validation groups used for this validation.\n */\n groups?: string[];\n\n /**\n * Specific validation type options.\n */\n options?: any;\n }[];\n };\n}\n"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js new file mode 100644 index 0000000..c1c5207 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js @@ -0,0 +1,31 @@ +import { ValidationMetadata } from "../metadata/ValidationMetadata"; +/** + * Used to transform validation schemas to validation metadatas. + */ +export class ValidationSchemaToMetadataTransformer { + transform(schema) { + const metadatas = []; + Object.keys(schema.properties).forEach(property => { + schema.properties[property].forEach(validation => { + const validationOptions = { + message: validation.message, + groups: validation.groups, + always: validation.always, + each: validation.each + }; + const args = { + type: validation.type, + target: schema.name, + propertyName: property, + constraints: validation.constraints, + validationTypeOptions: validation.options, + validationOptions: validationOptions + }; + metadatas.push(new ValidationMetadata(args)); + }); + }); + return metadatas; + } +} + +//# sourceMappingURL=ValidationSchemaToMetadataTransformer.js.map diff --git a/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js.map b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js.map new file mode 100644 index 0000000..901c450 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation-schema/ValidationSchemaToMetadataTransformer.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation-schema/ValidationSchemaToMetadataTransformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAKlE;;GAEG;AACH,MAAM,OAAO,qCAAqC;IAE9C,SAAS,CAAC,MAAwB;QAC9B,MAAM,SAAS,GAAyB,EAAE,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC9C,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;gBAC7C,MAAM,iBAAiB,GAAsB;oBACzC,OAAO,EAAE,UAAU,CAAC,OAAO;oBAC3B,MAAM,EAAE,UAAU,CAAC,MAAM;oBACzB,MAAM,EAAE,UAAU,CAAC,MAAM;oBACzB,IAAI,EAAE,UAAU,CAAC,IAAI;iBACxB,CAAC;gBACF,MAAM,IAAI,GAA2B;oBACjC,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,MAAM,EAAE,MAAM,CAAC,IAAI;oBACnB,YAAY,EAAE,QAAQ;oBACtB,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,qBAAqB,EAAE,UAAU,CAAC,OAAO;oBACzC,iBAAiB,EAAE,iBAAiB;iBACvC,CAAC;gBACF,SAAS,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACrB,CAAC;CAEJ","file":"ValidationSchemaToMetadataTransformer.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationArguments.js b/src/node_modules/class-validator/esm2015/validation/ValidationArguments.js new file mode 100644 index 0000000..4e35955 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationArguments.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidationArguments.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationArguments.js.map b/src/node_modules/class-validator/esm2015/validation/ValidationArguments.js.map new file mode 100644 index 0000000..ffdbd2a --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationArguments.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationArguments.ts"],"names":[],"mappings":"","file":"ValidationArguments.js","sourcesContent":["/**\n * Arguments being sent to message builders - user can create message either by simply returning a string,\n * either by returning a function that accepts MessageArguments and returns a message string built based on these arguments.\n */\nexport interface ValidationArguments {\n\n /**\n * Validating value.\n */\n value: any;\n\n /**\n * Constraints set by this validation type.\n */\n constraints: any[];\n\n /**\n * Name of the target that is being validated.\n */\n targetName: string;\n\n /**\n * Object that is being validated.\n */\n object: Object;\n\n /**\n * Name of the object's property being validated.\n */\n property: string;\n \n}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationError.js b/src/node_modules/class-validator/esm2015/validation/ValidationError.js new file mode 100644 index 0000000..9306d75 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationError.js @@ -0,0 +1,37 @@ +/** + * Validation error description. + */ +export class ValidationError { + /** + * + * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability + * @param hasParent true when the error is a child of an another one + * @param parentPath path as string to the parent of this property + */ + toString(shouldDecorate = false, hasParent = false, parentPath = ``) { + const boldStart = shouldDecorate ? `\x1b[1m` : ``; + const boldEnd = shouldDecorate ? `\x1b[22m` : ``; + const propConstraintFailed = (propertyName) => ` - property ${boldStart}${parentPath}${propertyName}${boldEnd} has failed the following constraints: ${boldStart}${Object.keys(this.constraints).join(`, `)}${boldEnd} \n`; + if (!hasParent) { + return `An instance of ${boldStart}${this.target ? this.target.constructor.name : "an object"}${boldEnd} has failed the validation:\n` + + (this.constraints ? propConstraintFailed(this.property) : ``) + + this.children + .map(childError => childError.toString(shouldDecorate, true, this.property)) + .join(``); + } + else { + // we format numbers as array indexes for better readability. + const formattedProperty = Number.isInteger(+this.property) ? `[${this.property}]` : `${parentPath ? `.` : ``}${this.property}`; + if (this.constraints) { + return propConstraintFailed(formattedProperty); + } + else { + return this.children + .map(childError => childError.toString(shouldDecorate, true, `${parentPath}${formattedProperty}`)) + .join(``); + } + } + } +} + +//# sourceMappingURL=ValidationError.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationError.js.map b/src/node_modules/class-validator/esm2015/validation/ValidationError.js.map new file mode 100644 index 0000000..479d0dc --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationError.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,eAAe;IAyCxB;;;;;OAKG;IACH,QAAQ,CAAC,iBAA0B,KAAK,EAAE,YAAqB,KAAK,EAAE,aAAqB,EAAE;QACzF,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,C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,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,cAAc,EAAE,IAAI,EAAE,GAAG,UAAU,GAAG,iBAAiB,EAAE,CAAG,CAAC;qBACnG,IAAI,CAAC,EAAE,CAAC,CAAC;aACjB;SACJ;IACL,CAAC;CACJ","file":"ValidationError.js","sourcesContent":["/**\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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js b/src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js new file mode 100644 index 0000000..c2ff53d --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js @@ -0,0 +1,316 @@ +import { ValidationError } from "./ValidationError"; +import { ValidationTypes } from "./ValidationTypes"; +import { ValidationUtils } from "./ValidationUtils"; +import { isPromise, convertToArray } from "../utils"; +import { getMetadataStorage } from "../metadata/MetadataStorage"; +/** + * Executes validation over given object. + */ +export class ValidationExecutor { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + constructor(validator, validatorOptions) { + this.validator = validator; + this.validatorOptions = validatorOptions; + // ------------------------------------------------------------------------- + // Properties + // ------------------------------------------------------------------------- + this.awaitingPromises = []; + this.ignoreAsyncValidations = false; + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + this.metadataStorage = getMetadataStorage(); + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + execute(object, targetSchema, validationErrors) { + /** + * If there is no metadata registered it means possibly the dependencies are not flatterned and + * more than one instance is used. + * + * TODO: This needs proper handling, forcing to use the same container or some other proper solution. + */ + if (!this.metadataStorage.hasValidationMetaData) { + console.warn(`No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies.`); + } + const groups = this.validatorOptions ? this.validatorOptions.groups : undefined; + const targetMetadatas = this.metadataStorage.getTargetValidationMetadatas(object.constructor, targetSchema, groups); + const groupedMetadatas = this.metadataStorage.groupByPropertyName(targetMetadatas); + if (this.validatorOptions && this.validatorOptions.forbidUnknownValues && !targetMetadatas.length) { + const validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + validationError.value = undefined; + validationError.property = undefined; + validationError.children = []; + validationError.constraints = { unknownValue: "an unknown value was passed to the validate function" }; + validationErrors.push(validationError); + return; + } + if (this.validatorOptions && this.validatorOptions.whitelist) + this.whitelist(object, groupedMetadatas, validationErrors); + // General validation + Object.keys(groupedMetadatas).forEach(propertyName => { + const value = object[propertyName]; + const definedMetadatas = groupedMetadatas[propertyName].filter(metadata => metadata.type === ValidationTypes.IS_DEFINED); + const metadatas = groupedMetadatas[propertyName].filter(metadata => metadata.type !== ValidationTypes.IS_DEFINED && metadata.type !== ValidationTypes.WHITELIST); + if (value instanceof Promise && metadatas.find(metadata => metadata.type === ValidationTypes.PROMISE_VALIDATION)) { + this.awaitingPromises.push(value.then((resolvedValue) => { + this.performValidations(object, resolvedValue, propertyName, definedMetadatas, metadatas, validationErrors); + })); + } + else { + this.performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors); + } + }); + } + whitelist(object, groupedMetadatas, validationErrors) { + let notAllowedProperties = []; + Object.keys(object).forEach(propertyName => { + // does this property have no metadata? + if (!groupedMetadatas[propertyName] || groupedMetadatas[propertyName].length === 0) + notAllowedProperties.push(propertyName); + }); + if (notAllowedProperties.length > 0) { + if (this.validatorOptions && this.validatorOptions.forbidNonWhitelisted) { + // throw errors + notAllowedProperties.forEach(property => { + const validationError = this.generateValidationError(object, object[property], property); + validationError.constraints = { [ValidationTypes.WHITELIST]: `property ${property} should not exist` }; + validationError.children = undefined; + validationErrors.push(validationError); + }); + } + else { + // strip non allowed properties + notAllowedProperties.forEach(property => delete object[property]); + } + } + } + stripEmptyErrors(errors) { + return errors.filter(error => { + if (error.children) { + error.children = this.stripEmptyErrors(error.children); + } + if (Object.keys(error.constraints).length === 0) { + if (error.children.length === 0) { + return false; + } + else { + delete error.constraints; + } + } + return true; + }); + } + // ------------------------------------------------------------------------- + // Private Methods + // ------------------------------------------------------------------------- + performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors) { + const customValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.CUSTOM_VALIDATION); + const nestedValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.NESTED_VALIDATION); + const conditionalValidationMetadatas = metadatas.filter(metadata => metadata.type === ValidationTypes.CONDITIONAL_VALIDATION); + const validationError = this.generateValidationError(object, value, propertyName); + validationErrors.push(validationError); + const canValidate = this.conditionalValidations(object, value, conditionalValidationMetadatas); + if (!canValidate) { + return; + } + // handle IS_DEFINED validation type the special way - it should work no matter skipUndefinedProperties/skipMissingProperties is set or not + this.customValidations(object, value, definedMetadatas, validationError); + this.mapContexts(object, value, definedMetadatas, validationError); + if (value === undefined && this.validatorOptions && this.validatorOptions.skipUndefinedProperties === true) { + return; + } + if (value === null && this.validatorOptions && this.validatorOptions.skipNullProperties === true) { + return; + } + if ((value === null || value === undefined) && this.validatorOptions && this.validatorOptions.skipMissingProperties === true) { + return; + } + this.customValidations(object, value, customValidationMetadatas, validationError); + this.nestedValidations(value, nestedValidationMetadatas, validationError.children); + this.mapContexts(object, value, metadatas, validationError); + this.mapContexts(object, value, customValidationMetadatas, validationError); + } + generateValidationError(object, value, propertyName) { + const validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.value === undefined || + this.validatorOptions.validationError.value === true) + validationError.value = value; + validationError.property = propertyName; + validationError.children = []; + validationError.constraints = {}; + return validationError; + } + conditionalValidations(object, value, metadatas) { + return metadatas + .map(metadata => metadata.constraints[0](object, value)) + .reduce((resultA, resultB) => resultA && resultB, true); + } + customValidations(object, value, metadatas, error) { + metadatas.forEach(metadata => { + this.metadataStorage + .getTargetValidatorConstraints(metadata.constraintCls) + .forEach(customConstraintMetadata => { + if (customConstraintMetadata.async && this.ignoreAsyncValidations) + return; + const validationArguments = { + targetName: object.constructor ? object.constructor.name : undefined, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + if (!metadata.each || !(value instanceof Array || value instanceof Set || value instanceof Map)) { + const validatedValue = customConstraintMetadata.instance.validate(value, validationArguments); + if (isPromise(validatedValue)) { + const promise = validatedValue.then(isValid => { + if (!isValid) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + this.awaitingPromises.push(promise); + } + else { + if (!validatedValue) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + } + } + return; + } + // convert set and map into array + const arrayValue = convertToArray(value); + // Validation needs to be applied to each array item + const validatedSubValues = arrayValue.map((subValue) => customConstraintMetadata.instance.validate(subValue, validationArguments)); + const validationIsAsync = validatedSubValues + .some((validatedSubValue) => isPromise(validatedSubValue)); + if (validationIsAsync) { + // Wrap plain values (if any) in promises, so that all are async + const asyncValidatedSubValues = validatedSubValues + .map((validatedSubValue) => isPromise(validatedSubValue) ? validatedSubValue : Promise.resolve(validatedSubValue)); + const asyncValidationIsFinishedPromise = Promise.all(asyncValidatedSubValues) + .then((flatValidatedValues) => { + const validationResult = flatValidatedValues.every((isValid) => isValid); + if (!validationResult) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + this.awaitingPromises.push(asyncValidationIsFinishedPromise); + return; + } + const validationResult = validatedSubValues.every((isValid) => isValid); + if (!validationResult) { + const [type, message] = this.createValidationError(object, value, metadata, customConstraintMetadata); + error.constraints[type] = message; + } + }); + }); + } + nestedValidations(value, metadatas, errors) { + if (value === void 0) { + return; + } + metadatas.forEach(metadata => { + if (metadata.type !== ValidationTypes.NESTED_VALIDATION && + metadata.type !== ValidationTypes.PROMISE_VALIDATION) { + return; + } + if (value instanceof Array || value instanceof Set || value instanceof Map) { + // Treats Set as an array - as index of Set value is value itself and it is common case to have Object as value + const arrayLikeValue = value instanceof Set ? Array.from(value) : value; + arrayLikeValue.forEach((subValue, index) => { + this.performValidations(value, subValue, index.toString(), [], metadatas, errors); + }); + } + else if (value instanceof Object) { + const targetSchema = typeof metadata.target === "string" ? metadata.target : metadata.target.name; + this.execute(value, targetSchema, errors); + } + else { + const error = new ValidationError(); + error.value = value; + error.property = metadata.propertyName; + error.target = metadata.target; + const [type, message] = this.createValidationError(metadata.target, value, metadata); + error.constraints = { + [type]: message + }; + errors.push(error); + } + }); + } + mapContexts(object, value, metadatas, error) { + return metadatas + .forEach(metadata => { + if (metadata.context) { + let customConstraint; + if (metadata.type === ValidationTypes.CUSTOM_VALIDATION) { + const customConstraints = this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls); + customConstraint = customConstraints[0]; + } + const type = this.getConstraintType(metadata, customConstraint); + if (error.constraints[type]) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + } + createValidationError(object, value, metadata, customValidatorMetadata) { + const targetName = object.constructor ? object.constructor.name : undefined; + const type = this.getConstraintType(metadata, customValidatorMetadata); + const validationArguments = { + targetName: targetName, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + let message = metadata.message || ""; + if (!metadata.message && + (!this.validatorOptions || (this.validatorOptions && !this.validatorOptions.dismissDefaultMessages))) { + if (customValidatorMetadata && customValidatorMetadata.instance.defaultMessage instanceof Function) { + message = customValidatorMetadata.instance.defaultMessage(validationArguments); + } + } + const messageString = ValidationUtils.replaceMessageSpecialTokens(message, validationArguments); + return [type, messageString]; + } + getConstraintType(metadata, customValidatorMetadata) { + const type = customValidatorMetadata && customValidatorMetadata.name ? customValidatorMetadata.name : metadata.type; + return type; + } +} + +//# sourceMappingURL=ValidationExecutor.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js.map b/src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js.map new file mode 100644 index 0000000..a2f9494 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationExecutor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationExecutor.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAe3B,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAE5E,YAAoB,SAAoB,EACpB,gBAAmC;QADnC,cAAS,GAAT,SAAS,CAAW;QACpB,qBAAgB,GAAhB,gBAAgB,CAAmB;QAlBvD,4EAA4E;QAC5E,aAAa;QACb,4EAA4E;QAE5E,qBAAgB,GAAmB,EAAE,CAAC;QACtC,2BAAsB,GAAY,KAAK,CAAC;QAExC,4EAA4E;QAC5E,qBAAqB;QACrB,4EAA4E;QAEpE,oBAAe,GAAG,kBAAkB,EAAE,CAAC;IAQ/C,CAAC;IAED,4EAA4E;IAC5E,iBAAiB;IACjB,4EAA4E;IAE5E,OAAO,CAAC,MAAc,EAAE,YAAoB,EAAE,gBAAmC;QAC7E;;;;;WAKG;QACH,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,qBAAqB,EAAE;YAC7C,OAAO,CAAC,IAAI,CAAC,+HAA+H,CAAC,CAAC;SACjJ;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,MA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,cAAc,CAAC,mBAAmB,CAAC,CAAC;aAClF;SACJ;QAED,MAAM,aAAa,GAAG,eAAe,CAAC,2BAA2B,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;QAChG,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACjC,CAAC;IAEO,iBAAiB,CAAC,QAA4B,EAAE,uBAA4C;QAChG,MAAM,IAAI,GAAG,uBAAuB,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QACpH,OAAO,IAAI,CAAC;IAChB,CAAC;CAEJ","file":"ValidationExecutor.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationTypes.js b/src/node_modules/class-validator/esm2015/validation/ValidationTypes.js new file mode 100644 index 0000000..aa6defe --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationTypes.js @@ -0,0 +1,22 @@ +/** + * Validation types. + */ +export class ValidationTypes { + /** + * Checks if validation type is valid. + */ + static isValid(type) { + return type !== "isValid" && + type !== "getMessage" && + Object.keys(this).map(key => this[key]).indexOf(type) !== -1; + } +} +/* system */ +ValidationTypes.CUSTOM_VALIDATION = "customValidation"; // done +ValidationTypes.NESTED_VALIDATION = "nestedValidation"; // done +ValidationTypes.PROMISE_VALIDATION = "promiseValidation"; // done +ValidationTypes.CONDITIONAL_VALIDATION = "conditionalValidation"; // done +ValidationTypes.WHITELIST = "whitelistValidation"; // done +ValidationTypes.IS_DEFINED = "isDefined"; // done + +//# sourceMappingURL=ValidationTypes.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationTypes.js.map b/src/node_modules/class-validator/esm2015/validation/ValidationTypes.js.map new file mode 100644 index 0000000..6be5de0 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationTypes.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,eAAe;IAUxB;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,IAAY;QACvB,OAAO,IAAI,KAAK,SAAS;YACrB,IAAI,KAAK,YAAY;YACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAE,IAAY,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9E,CAAC;;AAfD,YAAY;AACL,iCAAiB,GAAG,kBAAkB,CAAC,CAAC,OAAO;AAC/C,iCAAiB,GAAG,kBAAkB,CAAC,CAAC,OAAO;AAC/C,kCAAkB,GAAG,mBAAmB,CAAC,CAAC,OAAO;AACjD,sCAAsB,GAAG,uBAAuB,CAAC,CAAC,OAAO;AACzD,yBAAS,GAAG,qBAAqB,CAAC,CAAC,OAAO;AAC1C,0BAAU,GAAG,WAAW,CAAC,CAAC,OAAO","file":"ValidationTypes.js","sourcesContent":["/**\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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationUtils.js b/src/node_modules/class-validator/esm2015/validation/ValidationUtils.js new file mode 100644 index 0000000..622603f --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationUtils.js @@ -0,0 +1,25 @@ +export class ValidationUtils { + static replaceMessageSpecialTokens(message, validationArguments) { + let messageString; + if (message instanceof Function) { + messageString = message(validationArguments); + } + else if (typeof message === "string") { + messageString = message; + } + if (messageString && validationArguments.constraints instanceof Array) { + validationArguments.constraints.forEach((constraint, index) => { + messageString = messageString.replace(new RegExp(`\\$constraint${index + 1}`, "g"), constraint); + }); + } + if (messageString && validationArguments.value !== undefined && validationArguments.value !== null && typeof validationArguments.value === "string") + messageString = messageString.replace(/\$value/g, validationArguments.value); + if (messageString) + messageString = messageString.replace(/\$property/g, validationArguments.property); + if (messageString) + messageString = messageString.replace(/\$target/g, validationArguments.targetName); + return messageString; + } +} + +//# sourceMappingURL=ValidationUtils.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/ValidationUtils.js.map b/src/node_modules/class-validator/esm2015/validation/ValidationUtils.js.map new file mode 100644 index 0000000..07659c3 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidationUtils.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationUtils.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,eAAe;IAExB,MAAM,CAAC,2BAA2B,CAAC,OAAuD,EAC9D,mBAAwC;QAEhE,IAAI,aAAqB,CAAC;QAC1B,IAAI,OAAO,YAAY,QAAQ,EAAE;YAC7B,aAAa,GAAI,OAAiD,CAAC,mBAAmB,CAAC,CAAC;SAE3F;aAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YACpC,aAAa,GAAG,OAAiB,CAAC;SACrC;QAED,IAAI,aAAa,IAAI,mBAAmB,CAAC,WAAW,YAAY,KAAK,EAAE;YACnE,mBAAmB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;gBAC1D,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,gBAAgB,KAAK,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;YACpG,CAAC,CAAC,CAAC;SACN;QAED,IAAI,aAAa,IAAI,mBAAmB,CAAC,KAAK,KAAK,SAAS,IAAI,mBAAmB,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,mBAAmB,CAAC,KAAK,KAAK,QAAQ;YAC/I,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACjF,IAAI,aAAa;YACb,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,aAAa,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACvF,IAAI,aAAa;YACb,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;QAEvF,OAAO,aAAa,CAAC;IACzB,CAAC;CAEJ","file":"ValidationUtils.js","sourcesContent":["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}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/Validator.js b/src/node_modules/class-validator/esm2015/validation/Validator.js new file mode 100644 index 0000000..5b4fa9b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/Validator.js @@ -0,0 +1,53 @@ +import { ValidationExecutor } from "./ValidationExecutor"; +/** + * Validator performs validation of the given object based on its metadata. + */ +export class Validator { + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + /** + * Performs validation of the given object based on decorators or validation schema. + * Common method for `validateOrReject` and `validate` methods. + */ + coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + const options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + const schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + const executor = new ValidationExecutor(this, options); + const validationErrors = []; + executor.execute(object, schema, validationErrors); + return Promise.all(executor.awaitingPromises).then(() => { + return executor.stripEmptyErrors(validationErrors); + }); + } + /** + * Performs validation of the given object based on decorators or validation schema. + */ + validate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + return this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + } + /** + * Performs validation of the given object based on decorators or validation schema and reject on error. + */ + async validateOrReject(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const errors = await this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + if (errors.length) + return Promise.reject(errors); + } + /** + * Performs validation of the given object based on decorators or validation schema. + */ + validateSync(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + const object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + const options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + const schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + const executor = new ValidationExecutor(this, options); + executor.ignoreAsyncValidations = true; + const validationErrors = []; + executor.execute(object, schema, validationErrors); + return executor.stripEmptyErrors(validationErrors); + } +} + +//# sourceMappingURL=Validator.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/Validator.js.map b/src/node_modules/class-validator/esm2015/validation/Validator.js.map new file mode 100644 index 0000000..c261350 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/Validator.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/Validator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAIxD;;GAEG;AACH,MAAM,OAAO,SAAS;IAElB,4EAA4E;IAC5E,qBAAqB;IACrB,4EAA4E;IAG5E;;;OAGG;IACK,YAAY,CAAC,kBAAiC,EAAE,yBAAmD,EAAE,qBAAwC;QACjJ,MAAM,MAAM,GAAG,OAAO,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,yBAAmC,CAAC,CAAC,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CAAC,kBAA4B,CAAC;QAC3H,MAAM,OAAO,GAAG,OAAO,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,yBAA8C,CAAC;QAChI,MAAM,MAAM,GAAG,OAAO,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAA4B,CAAC,CAAC,CAAC,SAAS,CAAC;QAEjG,MAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACvD,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACvC,MAAM,gBAAgB,GAAsB,EAAE,CAAC;QAC/C,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;QACnD,OAAO,QAAQ,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACvD,CAAC;CAEJ","file":"Validator.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js b/src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js new file mode 100644 index 0000000..958d561 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidatorConstraintInterface.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js.map b/src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js.map new file mode 100644 index 0000000..1eff3c4 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidatorConstraintInterface.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidatorConstraintInterface.ts"],"names":[],"mappings":"","file":"ValidatorConstraintInterface.js","sourcesContent":["import {ValidationArguments} from \"./ValidationArguments\";\n/**\n * Custom validators must implement this interface to provide custom validation logic.\n */\nexport interface ValidatorConstraintInterface {\n\n /**\n * Method to be called to perform custom validation over given value.\n */\n validate(value: any, validationArguments?: ValidationArguments): Promise|boolean;\n\n /**\n * Gets default message when validation for this constraint fail.\n */\n defaultMessage?(validationArguments?: ValidationArguments): string;\n\n}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js b/src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js new file mode 100644 index 0000000..b0f3fb5 --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidatorOptions.js.map diff --git a/src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js.map b/src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js.map new file mode 100644 index 0000000..a68566b --- /dev/null +++ b/src/node_modules/class-validator/esm2015/validation/ValidatorOptions.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidatorOptions.ts"],"names":[],"mappings":"","file":"ValidatorOptions.js","sourcesContent":["/**\n * Options passed to validator during validation.\n */\nexport interface ValidatorOptions {\n /**\n * If set to true then validator will skip validation of all properties that are undefined in the validating object.\n */\n skipUndefinedProperties?: boolean;\n\n /**\n * If set to true then validator will skip validation of all properties that are null in the validating object.\n */\n skipNullProperties?: boolean;\n\n /**\n * If set to true then validator will skip validation of all properties that are null or undefined in the validating object.\n */\n skipMissingProperties?: boolean;\n\n /**\n * If set to true validator will strip validated object of any properties that do not have any decorators.\n *\n * Tip: if no other decorator is suitable for your property use @Allow decorator.\n */\n whitelist?: boolean;\n\n /**\n * If set to true, instead of stripping non-whitelisted properties validator will throw an error\n */\n forbidNonWhitelisted?: boolean;\n\n /**\n * Groups to be used during validation of the object.\n */\n groups?: string[];\n\n /**\n * If set to true, the validation will not use default messages.\n * Error message always will be undefined if its not explicitly set.\n */\n dismissDefaultMessages?: boolean;\n\n /**\n * ValidationError special options.\n */\n validationError?: {\n\n /**\n * Indicates if target should be exposed in ValidationError.\n */\n target?: boolean;\n\n /**\n * Indicates if validated value should be exposed in ValidationError.\n */\n value?: boolean;\n\n };\n\n /**\n * Settings true will cause fail validation of unknown objects.\n */\n forbidUnknownValues?: boolean;\n\n}\n"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/container.js b/src/node_modules/class-validator/esm5/container.js new file mode 100644 index 0000000..6cbaf33 --- /dev/null +++ b/src/node_modules/class-validator/esm5/container.js @@ -0,0 +1,48 @@ +/** + * Container to be used by this library for inversion control. If container was not implicitly set then by default + * container simply creates a new instance of the given class. + */ +var defaultContainer = new (/** @class */ (function () { + function class_1() { + this.instances = []; + } + class_1.prototype.get = function (someClass) { + var instance = this.instances.find(function (instance) { return instance.type === someClass; }); + if (!instance) { + instance = { type: someClass, object: new someClass() }; + this.instances.push(instance); + } + return instance.object; + }; + return class_1; +}()))(); +var userContainer; +var userContainerOptions; +/** + * Sets container to be used by this library. + */ +export function useContainer(iocContainer, options) { + userContainer = iocContainer; + userContainerOptions = options; +} +/** + * Gets the IOC container used by this library. + */ +export function getFromContainer(someClass) { + if (userContainer) { + try { + var instance = userContainer.get(someClass); + if (instance) + return instance; + if (!userContainerOptions || !userContainerOptions.fallback) + return instance; + } + catch (error) { + if (!userContainerOptions || !userContainerOptions.fallbackOnErrors) + throw error; + } + } + return defaultContainer.get(someClass); +} + +//# sourceMappingURL=container.js.map diff --git a/src/node_modules/class-validator/esm5/container.js.map b/src/node_modules/class-validator/esm5/container.js.map new file mode 100644 index 0000000..aeada7e --- /dev/null +++ b/src/node_modules/class-validator/esm5/container.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/container.ts"],"names":[],"mappings":"AAkBA;;;GAGG;AACH,IAAM,gBAAgB,GAAmE,IAAI;IAAC;QAClF,cAAS,GAAsC,EAAE,CAAC;IAU9D,CAAC;IATG,qBAAG,GAAH,UAAO,SAAsC;QACzC,IAAI,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,IAAI,KAAK,SAAS,EAA3B,CAA2B,CAAC,CAAC;QAC5E,IAAI,CAAC,QAAQ,EAAE;YACX,QAAQ,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC;YACxD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACjC;QAED,OAAO,QAAQ,CAAC,MAAM,CAAC;IAC3B,CAAC;IACL,cAAC;AAAD,CAX8F,AAW7F,IAAC,EAAE,CAAC;AAEL,IAAI,aAA6E,CAAC;AAClF,IAAI,oBAAyC,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,YAA0C,EAAE,OAA6B;IAClG,aAAa,GAAG,YAAY,CAAC;IAC7B,oBAAoB,GAAG,OAAO,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAI,SAA+C;IAC/E,IAAI,aAAa,EAAE;QACf,IAAI;YACA,IAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC9C,IAAI,QAAQ;gBACR,OAAO,QAAQ,CAAC;YAEpB,IAAI,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,CAAC,QAAQ;gBACvD,OAAO,QAAQ,CAAC;SAEvB;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,CAAC,oBAAoB,IAAI,CAAC,oBAAoB,CAAC,gBAAgB;gBAC/D,MAAM,KAAK,CAAC;SACnB;KACJ;IACD,OAAO,gBAAgB,CAAC,GAAG,CAAI,SAAS,CAAC,CAAC;AAC9C,CAAC","file":"container.js","sourcesContent":["\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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/ValidationOptions.js b/src/node_modules/class-validator/esm5/decorator/ValidationOptions.js new file mode 100644 index 0000000..ff10000 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/ValidationOptions.js @@ -0,0 +1,12 @@ +export function isValidationOptions(val) { + if (!val) { + return false; + } + return "each" in val + || "message" in val + || "groups" in val + || "always" in val + || "context" in val; +} + +//# sourceMappingURL=ValidationOptions.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/ValidationOptions.js.map b/src/node_modules/class-validator/esm5/decorator/ValidationOptions.js.map new file mode 100644 index 0000000..c6982da --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/ValidationOptions.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/ValidationOptions.ts"],"names":[],"mappings":"AAmCA,MAAM,UAAU,mBAAmB,CAAC,GAAQ;IACxC,IAAI,CAAC,GAAG,EAAE;QACN,OAAO,KAAK,CAAC;KAChB;IACD,OAAO,MAAM,IAAI,GAAG;WACb,SAAS,IAAI,GAAG;WAChB,QAAQ,IAAI,GAAG;WACf,QAAQ,IAAI,GAAG;WACf,SAAS,IAAI,GAAG,CAAC;AAC5B,CAAC","file":"ValidationOptions.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js b/src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js new file mode 100644 index 0000000..2f4f77c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var ARRAY_CONTAINS = "arrayContains"; +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +export function arrayContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(function (value) { return array.indexOf(value) !== -1; }); +} +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +export function ArrayContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_CONTAINS, + constraints: [values], + validator: { + validate: function (value, args) { return arrayContains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain $constraint1 values"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayContains.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js.map b/src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js.map new file mode 100644 index 0000000..3c275f3 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayContains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayContains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,cAAc,GAAG,eAAe,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,MAAa;IACvD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IAEjB,OAAO,MAAM,CAAC,KAAK,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAA3B,CAA2B,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,MAAa,EAAE,iBAAqC;IAC9E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAzC,CAAyC;YACpE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,4CAA4C,EAAzD,CAAyD,EACzE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayContains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js b/src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js new file mode 100644 index 0000000..615fb11 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var ARRAY_MAX_SIZE = "arrayMaxSize"; +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +export function arrayMaxSize(array, max) { + return array instanceof Array && array.length <= max; +} +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +export function ArrayMaxSize(max, validationOptions) { + return ValidateBy({ + name: ARRAY_MAX_SIZE, + constraints: [max], + validator: { + validate: function (value, args) { return arrayMaxSize(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain not more than $constraint1 elements"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayMaxSize.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js.map b/src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js.map new file mode 100644 index 0000000..49e6a8f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayMaxSize.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayMaxSize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,GAAW;IACpD,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAxC,CAAwC;YACnE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,4DAA4D,EAAzE,CAAyE,EACzF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayMaxSize.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js b/src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js new file mode 100644 index 0000000..2e79dd2 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var ARRAY_MIN_SIZE = "arrayMinSize"; +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +export function arrayMinSize(array, min) { + return array instanceof Array && array.length >= min; +} +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +export function ArrayMinSize(min, validationOptions) { + return ValidateBy({ + name: ARRAY_MIN_SIZE, + constraints: [min], + validator: { + validate: function (value, args) { return arrayMinSize(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain at least $constraint1 elements"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayMinSize.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js.map b/src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js.map new file mode 100644 index 0000000..684dbbf --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayMinSize.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayMinSize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,GAAW;IACpD,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAxC,CAAwC;YACnE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,uDAAuD,EAApE,CAAoE,EACpF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayMinSize.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js new file mode 100644 index 0000000..b2ca3fb --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var ARRAY_NOT_CONTAINS = "arrayNotContains"; +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +export function arrayNotContains(array, values) { + if (!(array instanceof Array)) + return false; + return values.every(function (value) { return array.indexOf(value) === -1; }); +} +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +export function ArrayNotContains(values, validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_CONTAINS, + constraints: [values], + validator: { + validate: function (value, args) { return arrayNotContains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not contain $constraint1 values"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayNotContains.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js.map b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js.map new file mode 100644 index 0000000..7641f1e --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotContains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayNotContains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,MAAa;IAC1D,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IAEjB,OAAO,MAAM,CAAC,KAAK,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAA3B,CAA2B,CAAC,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAa,EAAE,iBAAqC;IACjF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA5C,CAA4C;YACvE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,kDAAkD,EAA/D,CAA+D,EAC/E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayNotContains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js new file mode 100644 index 0000000..7fae0e1 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js @@ -0,0 +1,24 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var ARRAY_NOT_EMPTY = "arrayNotEmpty"; +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +export function arrayNotEmpty(array) { + return array instanceof Array && array.length > 0; +} +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +export function ArrayNotEmpty(validationOptions) { + return ValidateBy({ + name: ARRAY_NOT_EMPTY, + validator: { + validate: function (value, args) { return arrayNotEmpty(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be empty"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayNotEmpty.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js.map b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js.map new file mode 100644 index 0000000..630cf44 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayNotEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayNotEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IACxC,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACtD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,iBAAqC;IAC/D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,aAAa,CAAC,KAAK,CAAC,EAApB,CAAoB;YAC/C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+BAA+B,EAA5C,CAA4C,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayNotEmpty.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js b/src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js new file mode 100644 index 0000000..28e01db --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var ARRAY_UNIQUE = "arrayUnique"; +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +export function arrayUnique(array) { + if (!(array instanceof Array)) + return false; + var uniqueItems = array.filter(function (a, b, c) { return c.indexOf(a) === b; }); + return array.length === uniqueItems.length; +} +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +export function ArrayUnique(validationOptions) { + return ValidateBy({ + name: ARRAY_UNIQUE, + validator: { + validate: function (value, args) { return arrayUnique(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "All $property's elements must be unique"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=ArrayUnique.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js.map b/src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js.map new file mode 100644 index 0000000..cd6d7b7 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/array/ArrayUnique.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/array/ArrayUnique.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QACzB,OAAO,KAAK,CAAC;IAEjB,IAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAlB,CAAkB,CAAC,CAAC;IAClE,OAAO,KAAK,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,yCAAyC,EAAtD,CAAsD,EACtE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"ArrayUnique.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/Allow.js b/src/node_modules/class-validator/esm5/decorator/common/Allow.js new file mode 100644 index 0000000..a91bf75 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/Allow.js @@ -0,0 +1,19 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * If object has both allowed and not allowed properties a validation error will be thrown. + */ +export function Allow(validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.WHITELIST, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=Allow.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/Allow.js.map b/src/node_modules/class-validator/esm5/decorator/common/Allow.js.map new file mode 100644 index 0000000..2094279 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/Allow.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/Allow.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,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,IAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,SAAS;YAC/B,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"Allow.js","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 * 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/Equals.js b/src/node_modules/class-validator/esm5/decorator/common/Equals.js new file mode 100644 index 0000000..aa33722 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/Equals.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var EQUALS = "equals"; +/** + * Checks if value matches ("===") the comparison. + */ +export function equals(value, comparison) { + return value === comparison; +} +/** + * Checks if value matches ("===") the comparison. + */ +export function Equals(comparison, validationOptions) { + return ValidateBy({ + name: EQUALS, + constraints: [comparison], + validator: { + validate: function (value, args) { return equals(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be equal to $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Equals.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/Equals.js.map b/src/node_modules/class-validator/esm5/decorator/common/Equals.js.map new file mode 100644 index 0000000..db94b6f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/Equals.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/Equals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,MAAM,GAAG,QAAQ,CAAC;AAE/B;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,UAAmB;IACtD,OAAO,KAAK,KAAK,UAAU,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,UAAe,EAAE,iBAAqC;IACzE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC;YAC7D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,yCAAyC,EAAtD,CAAsD,EACtE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Equals.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsDefined.js b/src/node_modules/class-validator/esm5/decorator/common/IsDefined.js new file mode 100644 index 0000000..10779d6 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsDefined.js @@ -0,0 +1,24 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import { ValidationTypes } from "../../validation/ValidationTypes"; +// isDefined is (yet) a special case +export var IS_DEFINED = ValidationTypes.IS_DEFINED; +/** + * Checks if value is defined (!== undefined, !== null). + */ +export function isDefined(value) { + return value !== undefined && value !== null; +} +/** + * Checks if value is defined (!== undefined, !== null). + */ +export function IsDefined(validationOptions) { + return ValidateBy({ + name: IS_DEFINED, + validator: { + validate: function (value) { return isDefined(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be null or undefined"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDefined.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsDefined.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsDefined.js.map new file mode 100644 index 0000000..96b8dca --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsDefined.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsDefined.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,oCAAoC;AACpC,MAAM,CAAC,IAAM,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAU;IAChC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,EAAhB,CAAgB;YACrC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,2CAA2C,EAAxD,CAAwD,EACxE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDefined.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js b/src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js new file mode 100644 index 0000000..d084cbe --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_EMPTY = "isEmpty"; +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +export function isEmpty(value) { + return value === "" || value === null || value === undefined; +} +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +export function IsEmpty(validationOptions) { + return ValidateBy({ + name: IS_EMPTY, + validator: { + validate: function (value, args) { return isEmpty(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be empty"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEmpty.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js.map new file mode 100644 index 0000000..b5c3c28 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc;YACzC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,yBAAyB,EAAtC,CAAsC,EACtD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEmpty.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsIn.js b/src/node_modules/class-validator/esm5/decorator/common/IsIn.js new file mode 100644 index 0000000..574f6c9 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsIn.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_IN = "isIn"; +/** + * Checks if given value is in a array of allowed values. + */ +export function isIn(value, possibleValues) { + return !(possibleValues instanceof Array) || possibleValues.some(function (possibleValue) { return possibleValue === value; }); +} +/** + * Checks if given value is in a array of allowed values. + */ +export function IsIn(values, validationOptions) { + return ValidateBy({ + name: IS_IN, + constraints: [values], + validator: { + validate: function (value, args) { return isIn(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be one of the following values: $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIn.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsIn.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsIn.js.map new file mode 100644 index 0000000..adebb07 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsIn.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsIn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,KAAK,GAAG,MAAM,CAAC;AAE5B;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,KAAc,EAAE,cAAyB;IAC1D,OAAO,CAAC,CAAC,cAAc,YAAY,KAAK,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,UAAA,aAAa,IAAI,OAAA,aAAa,KAAK,KAAK,EAAvB,CAAuB,CAAC,CAAC;AAC/G,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,MAAa,EAAE,iBAAqC;IACrE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAhC,CAAgC;YAC3D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,6DAA6D,EAA1E,CAA0E,EAC1F,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIn.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js b/src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js new file mode 100644 index 0000000..d378f15 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import validator from "validator"; +export var IS_LATLONG = "isLatLong"; +/** + * Checks if a value is string in format a "latitude,longitude". + */ +export function isLatLong(value) { + return typeof value === "string" && validator.isLatLong(value); +} +/** + * Checks if a value is string in format a "latitude,longitude". + */ +export function IsLatLong(validationOptions) { + return ValidateBy({ + name: IS_LATLONG, + validator: { + validate: function (value, args) { return isLatLong(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a latitude,longitude string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLatLong.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js.map new file mode 100644 index 0000000..885ca9f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsLatLong.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsLatLong.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,EAAhB,CAAgB;YAC3C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+CAA+C,EAA5D,CAA4D,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLatLong.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js b/src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js new file mode 100644 index 0000000..cac4676 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import { isLatLong } from "./IsLatLong"; +export var IS_LATITUDE = "isLatitude"; +/** + * Checks if a given value is a latitude. + */ +export function isLatitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong(value + ",0"); +} +/** + * Checks if a given value is a latitude. + */ +export function IsLatitude(validationOptions) { + return ValidateBy({ + name: IS_LATITUDE, + validator: { + validate: function (value, args) { return isLatitude(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a latitude string or number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLatitude.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js.map new file mode 100644 index 0000000..0ad4346 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsLatitude.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsLatitude.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,IAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACpC,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,IAAI,SAAS,CAAI,KAAK,OAAI,CAAC,CAAC;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB;YAC5C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+CAA+C,EAA5D,CAA4D,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLatitude.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js b/src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js new file mode 100644 index 0000000..c2c88a7 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "./ValidateBy"; +import { isLatLong } from "./IsLatLong"; +export var IS_LONGITUDE = "isLongitude"; +/** + * Checks if a given value is a longitude. + */ +export function isLongitude(value) { + return (typeof value === "number" || typeof value === "string") && isLatLong("0," + value); +} +/** + * Checks if a given value is a longitude. + */ +export function IsLongitude(validationOptions) { + return ValidateBy({ + name: IS_LONGITUDE, + validator: { + validate: function (value, args) { return isLongitude(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a longitude string or number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLongitude.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js.map new file mode 100644 index 0000000..07cfb97 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsLongitude.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsLongitude.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACrC,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,IAAI,SAAS,CAAC,OAAK,KAAO,CAAC,CAAC;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gDAAgD,EAA7D,CAA6D,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLongitude.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js b/src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js new file mode 100644 index 0000000..93b9bb8 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_NOT_EMPTY = "isNotEmpty"; +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +export function isNotEmpty(value) { + return value !== "" && value !== null && value !== undefined; +} +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +export function IsNotEmpty(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY, + validator: { + validate: function (value, args) { return isNotEmpty(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be empty"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNotEmpty.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js.map new file mode 100644 index 0000000..53d2795 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsNotEmpty.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsNotEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AACjE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB;YAC5C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+BAA+B,EAA5C,CAA4C,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNotEmpty.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js b/src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js new file mode 100644 index 0000000..139d96b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_NOT_IN = "isNotIn"; +/** + * Checks if given value not in a array of allowed values. + */ +export function isNotIn(value, possibleValues) { + return !(possibleValues instanceof Array) || !possibleValues.some(function (possibleValue) { return possibleValue === value; }); +} +/** + * Checks if given value not in a array of allowed values. + */ +export function IsNotIn(values, validationOptions) { + return ValidateBy({ + name: IS_NOT_IN, + constraints: [values], + validator: { + validate: function (value, args) { return isNotIn(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be one of the following values: $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNotIn.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js.map new file mode 100644 index 0000000..cbe0b20 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsNotIn.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsNotIn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,SAAS,GAAG,SAAS,CAAC;AAEnC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,cAAyB;IAC7D,OAAO,CAAC,CAAC,cAAc,YAAY,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAA,aAAa,IAAI,OAAA,aAAa,KAAK,KAAK,EAAvB,CAAuB,CAAC,CAAC;AAChH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,MAAa,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAnC,CAAmC;YAC9D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,mEAAmE,EAAhF,CAAgF,EAChG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNotIn.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsOptional.js b/src/node_modules/class-validator/esm5/decorator/common/IsOptional.js new file mode 100644 index 0000000..0f33b7e --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsOptional.js @@ -0,0 +1,22 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Checks if value is missing and if so, ignores all validators. + */ +export function IsOptional(validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [function (object, value) { + return object[propertyName] !== null && object[propertyName] !== undefined; + }], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=IsOptional.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/IsOptional.js.map b/src/node_modules/class-validator/esm5/decorator/common/IsOptional.js.map new file mode 100644 index 0000000..4e87c61 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/IsOptional.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/IsOptional.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,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,IAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,sBAAsB;YAC5C,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,CAAC,UAAC,MAAW,EAAE,KAAU;oBAClC,OAAO,MAAM,CAAC,YAAY,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC;gBAC/E,CAAC,CAAC;YACF,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"IsOptional.js","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 * 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/NotEquals.js b/src/node_modules/class-validator/esm5/decorator/common/NotEquals.js new file mode 100644 index 0000000..cb4ee11 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/NotEquals.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var NOT_EQUALS = "notEquals"; +/** + * Checks if value does not match ("!==") the comparison. + */ +export function notEquals(value, comparison) { + return value !== comparison; +} +/** + * Checks if value does not match ("!==") the comparison. + */ +export function NotEquals(comparison, validationOptions) { + return ValidateBy({ + name: NOT_EQUALS, + constraints: [comparison], + validator: { + validate: function (value, args) { return notEquals(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not be equal to $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=NotEquals.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/NotEquals.js.map b/src/node_modules/class-validator/esm5/decorator/common/NotEquals.js.map new file mode 100644 index 0000000..9cd06be --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/NotEquals.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/NotEquals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,UAAmB;IACzD,OAAO,KAAK,KAAK,UAAU,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,UAAe,EAAE,iBAAqC;IAC5E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC;YAChE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+CAA+C,EAA5D,CAA4D,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"NotEquals.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/Validate.js b/src/node_modules/class-validator/esm5/decorator/common/Validate.js new file mode 100644 index 0000000..647fae3 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/Validate.js @@ -0,0 +1,35 @@ +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ConstraintMetadata } from "../../metadata/ConstraintMetadata"; +/** + * Registers custom validator class. + */ +export function ValidatorConstraint(options) { + return function (target) { + var isAsync = options && options.async ? true : false; + var name = options && options.name ? options.name : ""; + if (!name) { + name = target.name; + if (!name) // generate name if it was not given + name = name.replace(/\.?([A-Z]+)/g, function (x, y) { return "_" + y.toLowerCase(); }).replace(/^_/, ""); + } + var metadata = new ConstraintMetadata(target, name, isAsync); + getMetadataStorage().addConstraintMetadata(metadata); + }; +} +export function Validate(constraintClass, constraintsOrValidationOptions, maybeValidationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.CUSTOM_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraintCls: constraintClass, + constraints: constraintsOrValidationOptions instanceof Array ? constraintsOrValidationOptions : undefined, + validationOptions: !(constraintsOrValidationOptions instanceof Array) ? constraintsOrValidationOptions : maybeValidationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=Validate.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/Validate.js.map b/src/node_modules/class-validator/esm5/decorator/common/Validate.js.map new file mode 100644 index 0000000..bda1c7e --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/Validate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/Validate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAA4C;IAC5E,OAAO,UAAU,MAAgB;QAC7B,IAAM,OAAO,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;QACxD,IAAI,IAAI,GAAG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,IAAI,CAAC,IAAI,EAAE;YACP,IAAI,GAAI,MAAc,CAAC,IAAI,CAAC;YAC5B,IAAI,CAAC,IAAI,EAAE,oCAAoC;gBAC3C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,EAArB,CAAqB,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;SAC9F;QACD,IAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAC/D,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACzD,CAAC,CAAC;AACN,CAAC;AAQD,MAAM,UAAU,QAAQ,CAAC,eAAyB,EAAE,8BAA0D,EAAE,sBAA0C;IACtJ,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,IAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,iBAAiB;YACvC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,aAAa,EAAE,eAAe;YAC9B,WAAW,EAAE,8BAA8B,YAAY,KAAK,CAAC,CAAC,CAAC,8BAAuC,CAAC,CAAC,CAAC,SAAS;YAClH,iBAAiB,EAAE,CAAC,CAAC,8BAA8B,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,8BAAmD,CAAC,CAAC,CAAC,sBAAsB;SACvJ,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"Validate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js b/src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js new file mode 100644 index 0000000..a490e06 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js @@ -0,0 +1,23 @@ +import { registerDecorator } from "../../register-decorator"; +export function buildMessage(impl, validationOptions) { + return function (validationArguments) { + var eachPrefix = validationOptions && validationOptions.each + ? "each value in " + : ""; + return impl(eachPrefix, validationArguments); + }; +} +export function ValidateBy(options, validationOptions) { + return function (object, propertyName) { + registerDecorator({ + name: options.name, + target: object.constructor, + propertyName: propertyName, + options: validationOptions, + constraints: options.constraints, + validator: options.validator + }); + }; +} + +//# sourceMappingURL=ValidateBy.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js.map b/src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js.map new file mode 100644 index 0000000..8a24597 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidateBy.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/ValidateBy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAW7D,MAAM,UAAU,YAAY,CACxB,IAAgE,EAChE,iBAAqC;IAErC,OAAO,UAAC,mBAAyC;QAC7C,IAAM,UAAU,GAAG,iBAAiB,IAAI,iBAAiB,CAAC,IAAI;YAC1D,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC;IACjD,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,OAA0B,EAAE,iBAAqC;IACxF,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,iBAAiB,CAAC;YACd,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;SAC/B,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC","file":"ValidateBy.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js b/src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js new file mode 100644 index 0000000..bf4d575 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js @@ -0,0 +1,20 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +export function ValidateIf(condition, validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.CONDITIONAL_VALIDATION, + target: object.constructor, + propertyName: propertyName, + constraints: [condition], + validationOptions: validationOptions + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=ValidateIf.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js.map b/src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js.map new file mode 100644 index 0000000..7f538bb --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidateIf.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/ValidateIf.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,UAAU,CAAC,SAA+C,EAAE,iBAAqC;IAC7G,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,IAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,sBAAsB;YAC5C,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,CAAC,SAAS,CAAC;YACxB,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"ValidateIf.js","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 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js b/src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js new file mode 100644 index 0000000..0bcb358 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js @@ -0,0 +1,23 @@ +import * as tslib_1 from "tslib"; +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +export function ValidateNested(validationOptions) { + var opts = tslib_1.__assign({}, validationOptions); + var eachPrefix = opts.each ? "each value in " : ""; + opts.message = opts.message || eachPrefix + "nested property $property must be either object or array"; + return function (object, propertyName) { + var args = { + type: ValidationTypes.NESTED_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: opts, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=ValidateNested.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js.map b/src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js.map new file mode 100644 index 0000000..9ded9eb --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidateNested.js.map @@ -0,0 +1 @@ +{"version":3,"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;IAChE,IAAM,IAAI,wBAA2B,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;QACjD,IAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,iBAAiB;YACvC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,IAAI;SAC1B,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"ValidateNested.js","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) {\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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js b/src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js new file mode 100644 index 0000000..632f493 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js @@ -0,0 +1,19 @@ +import { ValidationTypes } from "../../validation/ValidationTypes"; +import { ValidationMetadata } from "../../metadata/ValidationMetadata"; +import { getMetadataStorage } from "../../metadata/MetadataStorage"; +/** + * Resolve promise before validation + */ +export function ValidatePromise(validationOptions) { + return function (object, propertyName) { + var args = { + type: ValidationTypes.PROMISE_VALIDATION, + target: object.constructor, + propertyName: propertyName, + validationOptions: validationOptions, + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(args)); + }; +} + +//# sourceMappingURL=ValidatePromise.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js.map b/src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js.map new file mode 100644 index 0000000..59b719f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/common/ValidatePromise.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/common/ValidatePromise.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,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,MAAc,EAAE,YAAoB;QACjD,IAAM,IAAI,GAA2B;YACjC,IAAI,EAAE,eAAe,CAAC,kBAAkB;YACxC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,iBAAiB,EAAE,iBAAiB;SACvC,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACN,CAAC","file":"ValidatePromise.js","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 * 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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/date/MaxDate.js b/src/node_modules/class-validator/esm5/decorator/date/MaxDate.js new file mode 100644 index 0000000..2c47e5c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/date/MaxDate.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var MAX_DATE = "maxDate"; +/** +* Checks if the value is a date that's before the specified date. +*/ +export function maxDate(date, maxDate) { + return date instanceof Date && date.getTime() <= maxDate.getTime(); +} +/** + * Checks if the value is a date that's after the specified date. + */ +export function MaxDate(date, validationOptions) { + return ValidateBy({ + name: MAX_DATE, + constraints: [date], + validator: { + validate: function (value, args) { return maxDate(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return "maximal allowed date for " + eachPrefix + "$property is $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MaxDate.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/date/MaxDate.js.map b/src/node_modules/class-validator/esm5/decorator/date/MaxDate.js.map new file mode 100644 index 0000000..b78765c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/date/MaxDate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/date/MaxDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAEjC;;EAEE;AACH,MAAM,UAAU,OAAO,CAAC,IAAa,EAAE,OAAa;IAChD,OAAO,IAAI,YAAY,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;AACvE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAU,EAAE,iBAAqC;IACrE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAnC,CAAmC;YAC9D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,2BAA2B,GAAG,UAAU,GAAG,2BAA2B,EAAtE,CAAsE,EACtF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MaxDate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/date/MinDate.js b/src/node_modules/class-validator/esm5/decorator/date/MinDate.js new file mode 100644 index 0000000..76bcce4 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/date/MinDate.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var MIN_DATE = "minDate"; +/** + * Checks if the value is a date that's after the specified date. + */ +export function minDate(date, minDate) { + return date instanceof Date && date.getTime() >= minDate.getTime(); +} +/** + * Checks if the value is a date that's after the specified date. + */ +export function MinDate(date, validationOptions) { + return ValidateBy({ + name: MIN_DATE, + constraints: [date], + validator: { + validate: function (value, args) { return minDate(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return "minimal allowed date for " + eachPrefix + "$property is $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MinDate.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/date/MinDate.js.map b/src/node_modules/class-validator/esm5/decorator/date/MinDate.js.map new file mode 100644 index 0000000..32cc0ce --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/date/MinDate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/date/MinDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAa,EAAE,OAAa;IAChD,OAAO,IAAI,YAAY,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;AACvE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAU,EAAE,iBAAqC;IACrE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAnC,CAAmC;YAC9D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,2BAA2B,GAAG,UAAU,GAAG,2BAA2B,EAAtE,CAAsE,EACtF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MinDate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/decorators.js b/src/node_modules/class-validator/esm5/decorator/decorators.js new file mode 100644 index 0000000..32b8621 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/decorators.js @@ -0,0 +1,132 @@ +// ------------------------------------------------------------------------- +// System +// ------------------------------------------------------------------------- +// ------------------------------------------------------------------------- +// Common checkers +// ------------------------------------------------------------------------- +export * from "./common/Allow"; +export * from "./common/IsDefined"; +export * from "./common/IsOptional"; +export * from "./common/Validate"; +export * from "./common/ValidateBy"; +export * from "./common/ValidateIf"; +export * from "./common/ValidateNested"; +export * from "./common/ValidatePromise"; +export * from "./common/IsLatLong"; +export * from "./common/IsLatitude"; +export * from "./common/IsLongitude"; +export * from "./common/Equals"; +export * from "./common/NotEquals"; +export * from "./common/IsEmpty"; +export * from "./common/IsNotEmpty"; +export * from "./common/IsIn"; +export * from "./common/IsNotIn"; +// ------------------------------------------------------------------------- +// Number checkers +// ------------------------------------------------------------------------- +export * from "./number/IsDivisibleBy"; +export * from "./number/IsPositive"; +export * from "./number/IsNegative"; +export * from "./number/Max"; +export * from "./number/Min"; +// ------------------------------------------------------------------------- +// Date checkers +// ------------------------------------------------------------------------- +export * from "./date/MinDate"; +export * from "./date/MaxDate"; +// ------------------------------------------------------------------------- +// String checkers +// ------------------------------------------------------------------------- +export * from "./string/Contains"; +export * from "./string/NotContains"; +export * from "./string/IsAlpha"; +export * from "./string/IsAlphanumeric"; +export * from "./string/IsDecimal"; +export * from "./string/IsAscii"; +export * from "./string/IsBase64"; +export * from "./string/IsByteLength"; +export * from "./string/IsCreditCard"; +export * from "./string/IsCurrency"; +export * from "./string/IsEmail"; +export * from "./string/IsFQDN"; +export * from "./string/IsFullWidth"; +export * from "./string/IsHalfWidth"; +export * from "./string/IsVariableWidth"; +export * from "./string/IsHexColor"; +export * from "./string/IsHexadecimal"; +export * from "./string/IsMacAddress"; +export * from "./string/IsIP"; +export * from "./string/IsPort"; +export * from "./string/IsISBN"; +export * from "./string/IsISIN"; +export * from "./string/IsISO8601"; +export * from "./string/IsJSON"; +export * from "./string/IsJWT"; +export * from "./string/IsLowercase"; +export * from "./string/IsMobilePhone"; +export * from "./string/IsISO31661Alpha2"; +export * from "./string/IsISO31661Alpha3"; +export * from "./string/IsMongoId"; +export * from "./string/IsMultibyte"; +export * from "./string/IsSurrogatePair"; +export * from "./string/IsUrl"; +export * from "./string/IsUUID"; +export * from "./string/IsFirebasePushId"; +export * from "./string/IsUppercase"; +export * from "./string/Length"; +export * from "./string/MaxLength"; +export * from "./string/MinLength"; +export * from "./string/Matches"; +export * from "./string/IsPhoneNumber"; +export * from "./string/IsMilitaryTime"; +export * from "./string/IsHash"; +export * from "./string/IsISSN"; +export * from "./string/IsDateString"; +export * from "./string/IsBooleanString"; +export * from "./string/IsNumberString"; +export * from "./string/IsBase32"; +export * from "./string/IsBIC"; +export * from "./string/IsBtcAddress"; +export * from "./string/IsDataURI"; +export * from "./string/IsEAN"; +export * from "./string/IsEthereumAddress"; +export * from "./string/IsHSL"; +export * from "./string/IsIBAN"; +export * from "./string/IsIdentityCard"; +export * from "./string/IsISRC"; +export * from "./string/IsLocale"; +export * from "./string/IsMagnetURI"; +export * from "./string/IsMimeType"; +export * from "./string/IsOctal"; +export * from "./string/IsPassportNumber"; +export * from "./string/IsPostalCode"; +export * from "./string/IsRFC3339"; +export * from "./string/IsRgbColor"; +export * from "./string/IsSemVer"; +// ------------------------------------------------------------------------- +// Type checkers +// ------------------------------------------------------------------------- +export * from "./typechecker/IsBoolean"; +export * from "./typechecker/IsDate"; +export * from "./typechecker/IsNumber"; +export * from "./typechecker/IsEnum"; +export * from "./typechecker/IsInt"; +export * from "./typechecker/IsString"; +export * from "./typechecker/IsArray"; +export * from "./typechecker/IsObject"; +// ------------------------------------------------------------------------- +// Array checkers +// ------------------------------------------------------------------------- +export * from "./array/ArrayContains"; +export * from "./array/ArrayNotContains"; +export * from "./array/ArrayNotEmpty"; +export * from "./array/ArrayMinSize"; +export * from "./array/ArrayMaxSize"; +export * from "./array/ArrayUnique"; +// ------------------------------------------------------------------------- +// Object checkers +// ------------------------------------------------------------------------- +export * from "./object/IsNotEmptyObject"; +export * from "./object/IsInstance"; + +//# sourceMappingURL=decorators.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/decorators.js.map b/src/node_modules/class-validator/esm5/decorator/decorators.js.map new file mode 100644 index 0000000..3429231 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/decorators.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/decorators.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,SAAS;AACT,4EAA4E;AAE5E,4EAA4E;AAC5E,kBAAkB;AAClB,4EAA4E;AAE5E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AAEjC,4EAA4E;AAC5E,kBAAkB;AAClB,4EAA4E;AAE5E,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAE7B,4EAA4E;AAC5E,gBAAgB;AAChB,4EAA4E;AAE5E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAE/B,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AC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAElC,4EAA4E;AAC5E,gBAAgB;AAChB,4EAA4E;AAE5E,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAEvC,4EAA4E;AAC5E,iBAAiB;AACjB,4EAA4E;AAE5E,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AAEpC,4EAA4E;AAC5E,kBAAkB;AAClB,4EAA4E;AAE5E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC","file":"decorators.js","sourcesContent":["// -------------------------------------------------------------------------\n// System\n// -------------------------------------------------------------------------\n\n// -------------------------------------------------------------------------\n// Common checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./common/Allow\";\nexport * from \"./common/IsDefined\";\nexport * from \"./common/IsOptional\";\nexport * from \"./common/Validate\";\nexport * from \"./common/ValidateBy\";\nexport * from \"./common/ValidateIf\";\nexport * from \"./common/ValidateNested\";\nexport * from \"./common/ValidatePromise\";\nexport * from \"./common/IsLatLong\";\nexport * from \"./common/IsLatitude\";\nexport * from \"./common/IsLongitude\";\nexport * from \"./common/Equals\";\nexport * from \"./common/NotEquals\";\nexport * from \"./common/IsEmpty\";\nexport * from \"./common/IsNotEmpty\";\nexport * from \"./common/IsIn\";\nexport * from \"./common/IsNotIn\";\n\n// -------------------------------------------------------------------------\n// Number checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./number/IsDivisibleBy\";\nexport * from \"./number/IsPositive\";\nexport * from \"./number/IsNegative\";\nexport * from \"./number/Max\";\nexport * from \"./number/Min\";\n\n// -------------------------------------------------------------------------\n// Date checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./date/MinDate\";\nexport * from \"./date/MaxDate\";\n\n// -------------------------------------------------------------------------\n// String checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./string/Contains\";\nexport * from \"./string/NotContains\";\nexport * from \"./string/IsAlpha\";\nexport * from \"./string/IsAlphanumeric\";\nexport * from \"./string/IsDecimal\";\nexport * from \"./string/IsAscii\";\nexport * from \"./string/IsBase64\";\nexport * from \"./string/IsByteLength\";\nexport * from \"./string/IsCreditCard\";\nexport * from \"./string/IsCurrency\";\nexport * from \"./string/IsEmail\";\nexport * from \"./string/IsFQDN\";\nexport * from \"./string/IsFullWidth\";\nexport * from \"./string/IsHalfWidth\";\nexport * from \"./string/IsVariableWidth\";\nexport * from \"./string/IsHexColor\";\nexport * from \"./string/IsHexadecimal\";\nexport * from \"./string/IsMacAddress\";\nexport * from \"./string/IsIP\";\nexport * from \"./string/IsPort\";\nexport * from \"./string/IsISBN\";\nexport * from \"./string/IsISIN\";\nexport * from \"./string/IsISO8601\";\nexport * from \"./string/IsJSON\";\nexport * from \"./string/IsJWT\";\nexport * from \"./string/IsLowercase\";\nexport * from \"./string/IsMobilePhone\";\nexport * from \"./string/IsISO31661Alpha2\";\nexport * from \"./string/IsISO31661Alpha3\";\nexport * from \"./string/IsMongoId\";\nexport * from \"./string/IsMultibyte\";\nexport * from \"./string/IsSurrogatePair\";\nexport * from \"./string/IsUrl\";\nexport * from \"./string/IsUUID\";\nexport * from \"./string/IsFirebasePushId\";\nexport * from \"./string/IsUppercase\";\nexport * from \"./string/Length\";\nexport * from \"./string/MaxLength\";\nexport * from \"./string/MinLength\";\nexport * from \"./string/Matches\";\nexport * from \"./string/IsPhoneNumber\";\nexport * from \"./string/IsMilitaryTime\";\nexport * from \"./string/IsHash\";\nexport * from \"./string/IsISSN\";\nexport * from \"./string/IsDateString\";\nexport * from \"./string/IsBooleanString\";\nexport * from \"./string/IsNumberString\";\nexport * from \"./string/IsBase32\";\nexport * from \"./string/IsBIC\";\nexport * from \"./string/IsBtcAddress\";\nexport * from \"./string/IsDataURI\";\nexport * from \"./string/IsEAN\";\nexport * from \"./string/IsEthereumAddress\";\nexport * from \"./string/IsHSL\";\nexport * from \"./string/IsIBAN\";\nexport * from \"./string/IsIdentityCard\";\nexport * from \"./string/IsISRC\";\nexport * from \"./string/IsLocale\";\nexport * from \"./string/IsMagnetURI\";\nexport * from \"./string/IsMimeType\";\nexport * from \"./string/IsOctal\";\nexport * from \"./string/IsPassportNumber\";\nexport * from \"./string/IsPostalCode\";\nexport * from \"./string/IsRFC3339\";\nexport * from \"./string/IsRgbColor\";\nexport * from \"./string/IsSemVer\";\n\n// -------------------------------------------------------------------------\n// Type checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./typechecker/IsBoolean\";\nexport * from \"./typechecker/IsDate\";\nexport * from \"./typechecker/IsNumber\";\nexport * from \"./typechecker/IsEnum\";\nexport * from \"./typechecker/IsInt\";\nexport * from \"./typechecker/IsString\";\nexport * from \"./typechecker/IsArray\";\nexport * from \"./typechecker/IsObject\";\n\n// -------------------------------------------------------------------------\n// Array checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./array/ArrayContains\";\nexport * from \"./array/ArrayNotContains\";\nexport * from \"./array/ArrayNotEmpty\";\nexport * from \"./array/ArrayMinSize\";\nexport * from \"./array/ArrayMaxSize\";\nexport * from \"./array/ArrayUnique\";\n\n// -------------------------------------------------------------------------\n// Object checkers\n// -------------------------------------------------------------------------\n\nexport * from \"./object/IsNotEmptyObject\";\nexport * from \"./object/IsInstance\";\n"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js b/src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js new file mode 100644 index 0000000..18b8c36 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_DIVISIBLE_BY = "isDivisibleBy"; +/** + * Checks if value is a number that's divisible by another. + */ +export function isDivisibleBy(value, num) { + return typeof value === "number" && + typeof num === "number" && + validator.isDivisibleBy(String(value), num); +} +/** + * Checks if value is a number that's divisible by another. + */ +export function IsDivisibleBy(num, validationOptions) { + return ValidateBy({ + name: IS_DIVISIBLE_BY, + constraints: [num], + validator: { + validate: function (value, args) { return isDivisibleBy(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be divisible by $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDivisibleBy.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js.map b/src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js.map new file mode 100644 index 0000000..fd84225 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/IsDivisibleBy.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/IsDivisibleBy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,GAAW;IACrD,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC5B,OAAO,GAAG,KAAK,QAAQ;QACvB,SAAS,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,iBAAqC;IAC5E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAzC,CAAyC;YACpE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,6CAA6C,EAA1D,CAA0D,EAC1E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDivisibleBy.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/number/IsNegative.js b/src/node_modules/class-validator/esm5/decorator/number/IsNegative.js new file mode 100644 index 0000000..b3066ad --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/IsNegative.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_NEGATIVE = "isNegative"; +/** + * Checks if the value is a negative number smaller than zero. + */ +export function isNegative(value) { + return typeof value === "number" && value < 0; +} +/** + * Checks if the value is a negative number smaller than zero. + */ +export function IsNegative(validationOptions) { + return ValidateBy({ + name: IS_NEGATIVE, + validator: { + validate: function (value, args) { return isNegative(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a negative number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNegative.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/number/IsNegative.js.map b/src/node_modules/class-validator/esm5/decorator/number/IsNegative.js.map new file mode 100644 index 0000000..f5e6c46 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/IsNegative.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/IsNegative.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB;YAC5C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,qCAAqC,EAAlD,CAAkD,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNegative.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/number/IsPositive.js b/src/node_modules/class-validator/esm5/decorator/number/IsPositive.js new file mode 100644 index 0000000..ba30a42 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/IsPositive.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_POSITIVE = "isPositive"; +/** + * Checks if the value is a positive number greater than zero. + */ +export function isPositive(value) { + return typeof value === "number" && value > 0; +} +/** + * Checks if the value is a positive number greater than zero. + */ +export function IsPositive(validationOptions) { + return ValidateBy({ + name: IS_POSITIVE, + validator: { + validate: function (value, args) { return isPositive(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a positive number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPositive.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/number/IsPositive.js.map b/src/node_modules/class-validator/esm5/decorator/number/IsPositive.js.map new file mode 100644 index 0000000..7810a28 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/IsPositive.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/IsPositive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB;YAC5C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,qCAAqC,EAAlD,CAAkD,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPositive.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/number/Max.js b/src/node_modules/class-validator/esm5/decorator/number/Max.js new file mode 100644 index 0000000..1b602e7 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/Max.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var MAX = "max"; +/** + * Checks if the first number is less than or equal to the second. + */ +export function max(num, max) { + return typeof num === "number" && typeof max === "number" && num <= max; +} +/** + * Checks if the first number is less than or equal to the second. + */ +export function Max(maxValue, validationOptions) { + return ValidateBy({ + name: MAX, + constraints: [maxValue], + validator: { + validate: function (value, args) { return max(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must not be greater than $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Max.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/number/Max.js.map b/src/node_modules/class-validator/esm5/decorator/number/Max.js.map new file mode 100644 index 0000000..1daafb8 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/Max.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/Max.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,GAAG,GAAG,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,GAAY,EAAE,GAAW;IACzC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,iBAAqC;IACvE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,CAAC,QAAQ,CAAC;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA/B,CAA+B;YAC1D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iDAAiD,EAA9D,CAA8D,EAC9E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Max.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/number/Min.js b/src/node_modules/class-validator/esm5/decorator/number/Min.js new file mode 100644 index 0000000..e6ad868 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/Min.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var MIN = "min"; +/** + * Checks if the first number is greater than or equal to the second. + */ +export function min(num, min) { + return typeof num === "number" && typeof min === "number" && num >= min; +} +/** + * Checks if the first number is greater than or equal to the second. + */ +export function Min(minValue, validationOptions) { + return ValidateBy({ + name: MIN, + constraints: [minValue], + validator: { + validate: function (value, args) { return min(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must not be less than $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Min.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/number/Min.js.map b/src/node_modules/class-validator/esm5/decorator/number/Min.js.map new file mode 100644 index 0000000..6c41f81 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/number/Min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/number/Min.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,GAAG,GAAG,KAAK,CAAC;AAEzB;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,GAAY,EAAE,GAAW;IACzC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,IAAI,GAAG,CAAC;AAC5E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,iBAAqC;IACvE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,CAAC,QAAQ,CAAC;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA/B,CAA+B;YAC1D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,8CAA8C,EAA3D,CAA2D,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Min.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/object/IsInstance.js b/src/node_modules/class-validator/esm5/decorator/object/IsInstance.js new file mode 100644 index 0000000..af20fc8 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/object/IsInstance.js @@ -0,0 +1,32 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_INSTANCE = "isInstance"; +/** + * Checks if the value is an instance of the specified object. + */ +export function isInstance(object, targetTypeConstructor) { + return targetTypeConstructor + && typeof targetTypeConstructor === "function" + && object instanceof targetTypeConstructor; +} +/** + * Checks if the value is an instance of the specified object. + */ +export function IsInstance(targetType, validationOptions) { + return ValidateBy({ + name: IS_INSTANCE, + constraints: [targetType], + validator: { + validate: function (value, args) { return isInstance(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix, args) { + if (args.constraints[0]) { + return eachPrefix + ("$property must be an instance of " + args.constraints[0].name); + } + else { + return eachPrefix + (IS_INSTANCE + " decorator expects and object as value, but got falsy value."); + } + }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsInstance.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/object/IsInstance.js.map b/src/node_modules/class-validator/esm5/decorator/object/IsInstance.js.map new file mode 100644 index 0000000..28f9e2c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/object/IsInstance.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/object/IsInstance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,MAAe,EAAE,qBAAkD;IAC1F,OAAO,qBAAqB;WACrB,OAAO,qBAAqB,KAAK,UAAU;WAC3C,MAAM,YAAY,qBAAqB,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,UAAuC,EAAE,iBAAqC;IACrG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,CAAC,UAAU,CAAC;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAtC,CAAsC;YACjE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,EAAE,IAAI;gBACb,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;oBACrB,OAAO,UAAU,IAAG,sCAAoC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAM,CAAA,CAAC;iBACtF;qBAAM;oBACH,OAAO,UAAU,IAAM,WAAW,iEAA8D,CAAA,CAAC;iBACpG;YACL,CAAC,EACD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsInstance.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js b/src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js new file mode 100644 index 0000000..373d14e --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js @@ -0,0 +1,33 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import { isObject } from "../typechecker/IsObject"; +export var IS_NOT_EMPTY_OBJECT = "isNotEmptyObject"; +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +export function isNotEmptyObject(value) { + if (!isObject(value)) { + return false; + } + for (var key in value) { + if (value.hasOwnProperty(key)) { + return true; + } + } + return false; +} +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +export function IsNotEmptyObject(validationOptions) { + return ValidateBy({ + name: IS_NOT_EMPTY_OBJECT, + validator: { + validate: function (value, args) { return isNotEmptyObject(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a non-empty object"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNotEmptyObject.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js.map b/src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js.map new file mode 100644 index 0000000..21e3dbc --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/object/IsNotEmptyObject.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/object/IsNotEmptyObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,CAAC,IAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAClB,OAAO,KAAK,CAAC;KAChB;IACD,KAAK,IAAM,GAAG,IAAI,KAAK,EAAE;QACrB,IAAI,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC;SACf;KACJ;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,gBAAgB,CAAC,KAAK,CAAC,EAAvB,CAAuB;YAClD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,sCAAsC,EAAnD,CAAmD,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNotEmptyObject.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/Contains.js b/src/node_modules/class-validator/esm5/decorator/string/Contains.js new file mode 100644 index 0000000..0583751 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/Contains.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var CONTAINS = "contains"; +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +export function contains(value, seed) { + return typeof value === "string" && validator.contains(value, seed); +} +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +export function Contains(seed, validationOptions) { + return ValidateBy({ + name: CONTAINS, + constraints: [seed], + validator: { + validate: function (value, args) { return contains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a $constraint1 string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Contains.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/Contains.js.map b/src/node_modules/class-validator/esm5/decorator/string/Contains.js.map new file mode 100644 index 0000000..4f0390b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/Contains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/Contains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,QAAQ,GAAG,UAAU,CAAC;AAEnC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc,EAAE,IAAY;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAApC,CAAoC;YAC/D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,8CAA8C,EAA3D,CAA2D,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Contains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js b/src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js new file mode 100644 index 0000000..9aa375d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_ALPHA = "isAlpha"; +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +export function isAlpha(value, locale) { + return typeof value === "string" && ValidatorJS.isAlpha(value, locale); +} +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +export function IsAlpha(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHA, + constraints: [locale], + validator: { + validate: function (value, args) { return isAlpha(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain only letters (a-zA-Z)"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsAlpha.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js.map new file mode 100644 index 0000000..0ee260f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsAlpha.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsAlpha.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,MAAgC;IACpE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,MAAe,EAAE,iBAAqC;IAC1E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAnC,CAAmC;YAC9D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,8CAA8C,EAA3D,CAA2D,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsAlpha.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js b/src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js new file mode 100644 index 0000000..67b8ac1 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_ALPHANUMERIC = "isAlphanumeric"; +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export function isAlphanumeric(value, locale) { + return typeof value === "string" && ValidatorJS.isAlphanumeric(value, locale); +} +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export function IsAlphanumeric(locale, validationOptions) { + return ValidateBy({ + name: IS_ALPHANUMERIC, + constraints: [locale], + validator: { + validate: function (value, args) { return isAlphanumeric(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain only letters and numbers"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsAlphanumeric.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js.map new file mode 100644 index 0000000..f612a8c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsAlphanumeric.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsAlphanumeric.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,eAAe,GAAG,gBAAgB,CAAC;AAEhD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,MAAuC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAClF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAe,EAAE,iBAAqC;IACjF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA1C,CAA0C;YACrE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iDAAiD,EAA9D,CAA8D,EAC9E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsAlphanumeric.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsAscii.js b/src/node_modules/class-validator/esm5/decorator/string/IsAscii.js new file mode 100644 index 0000000..0d40a50 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsAscii.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_ASCII = "isAscii"; +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +export function isAscii(value) { + return typeof value === "string" && validator.isAscii(value); +} +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +export function IsAscii(validationOptions) { + return ValidateBy({ + name: IS_ASCII, + validator: { + validate: function (value, args) { return isAscii(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain only ASCII characters"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsAscii.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsAscii.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsAscii.js.map new file mode 100644 index 0000000..a8cf877 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsAscii.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsAscii.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc;YACzC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,8CAA8C,EAA3D,CAA2D,EAC3E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsAscii.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBIC.js b/src/node_modules/class-validator/esm5/decorator/string/IsBIC.js new file mode 100644 index 0000000..ad04960 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBIC.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_BIC = "isBIC"; +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +export function isBIC(value) { + return typeof value === "string" && validator.isBIC(value); +} +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +export function IsBIC(validationOptions) { + return ValidateBy({ + name: IS_BIC, + validator: { + validate: function (value, args) { return isBIC(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a BIC or SWIFT code"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBIC.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBIC.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsBIC.js.map new file mode 100644 index 0000000..94be5fd --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBIC.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBIC.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,EAAZ,CAAY;YACvC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,uCAAuC,EAApD,CAAoD,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBIC.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBase32.js b/src/node_modules/class-validator/esm5/decorator/string/IsBase32.js new file mode 100644 index 0000000..f2990e1 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBase32.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_BASE32 = "isBase32"; +/** + * Checks if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +export function isBase32(value) { + return typeof value === "string" && validator.isBase32(value); +} +/** + * Check if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +export function IsBase32(validationOptions) { + return ValidateBy({ + name: IS_BASE32, + validator: { + validate: function (value, args) { return isBase32(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be base32 encoded"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBase32.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBase32.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsBase32.js.map new file mode 100644 index 0000000..65d8f55 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBase32.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBase32.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe;YAC1C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,kCAAkC,EAA/C,CAA+C,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBase32.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBase64.js b/src/node_modules/class-validator/esm5/decorator/string/IsBase64.js new file mode 100644 index 0000000..9a21153 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBase64.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_BASE64 = "isBase64"; +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +export function isBase64(value) { + return typeof value === "string" && validator.isBase64(value); +} +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +export function IsBase64(validationOptions) { + return ValidateBy({ + name: IS_BASE64, + validator: { + validate: function (value, args) { return isBase64(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be base64 encoded"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBase64.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBase64.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsBase64.js.map new file mode 100644 index 0000000..f776f5f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBase64.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBase64.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe;YAC1C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,kCAAkC,EAA/C,CAA+C,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBase64.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js b/src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js new file mode 100644 index 0000000..28c1dfd --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_BOOLEAN_STRING = "isBooleanString"; +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +export function isBooleanString(value) { + return typeof value === "string" && validator.isBoolean(value); +} +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +export function IsBooleanString(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN_STRING, + validator: { + validate: function (value, args) { return isBooleanString(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a boolean string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBooleanString.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js.map new file mode 100644 index 0000000..bac49f8 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBooleanString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBooleanString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,eAAe,CAAC,KAAK,CAAC,EAAtB,CAAsB;YACjD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,oCAAoC,EAAjD,CAAiD,EACjE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBooleanString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js b/src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js new file mode 100644 index 0000000..ae81b2e --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_BTC_ADDRESS = "isBtcAddress"; +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +export function isBtcAddress(value) { + return typeof value === "string" && validator.isBtcAddress(value); +} +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +export function IsBtcAddress(validationOptions) { + return ValidateBy({ + name: IS_BTC_ADDRESS, + validator: { + validate: function (value, args) { return isBtcAddress(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a BTC address"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBtcAddress.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js.map new file mode 100644 index 0000000..fea7c4d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsBtcAddress.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsBtcAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,iBAAqC;IAC9D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,CAAC,EAAnB,CAAmB;YAC9C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iCAAiC,EAA9C,CAA8C,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBtcAddress.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js b/src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js new file mode 100644 index 0000000..7028b90 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_BYTE_LENGTH = "isByteLength"; +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +export function isByteLength(value, min, max) { + return typeof value === "string" && validator.isByteLength(value, { min: min, max: max }); +} +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +export function IsByteLength(min, max, validationOptions) { + return ValidateBy({ + name: IS_BYTE_LENGTH, + constraints: [min, max], + validator: { + validate: function (value, args) { return isByteLength(value, args.constraints[0], args.constraints[1]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property's byte length must fall into ($constraint1, $constraint2) range"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsByteLength.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js.map new file mode 100644 index 0000000..765690c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsByteLength.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsByteLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,GAAW,EAAE,GAAY;IAClE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,GAAY,EAAE,iBAAqC;IACzF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA7D,CAA6D;YACxF,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,2EAA2E,EAAxF,CAAwF,EACxG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsByteLength.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js b/src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js new file mode 100644 index 0000000..92b6e8d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_CREDIT_CARD = "isCreditCard"; +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +export function isCreditCard(value) { + return typeof value === "string" && validator.isCreditCard(value); +} +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +export function IsCreditCard(validationOptions) { + return ValidateBy({ + name: IS_CREDIT_CARD, + validator: { + validate: function (value, args) { return isCreditCard(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a credit card"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsCreditCard.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js.map new file mode 100644 index 0000000..1c8b1b0 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsCreditCard.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsCreditCard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,iBAAqC;IAC9D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,CAAC,EAAnB,CAAmB;YAC9C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iCAAiC,EAA9C,CAA8C,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsCreditCard.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js b/src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js new file mode 100644 index 0000000..d94d895 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_CURRENCY = "isCurrency"; +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +export function isCurrency(value, options) { + return typeof value === "string" && ValidatorJS.isCurrency(value, options); +} +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +export function IsCurrency(options, validationOptions) { + return ValidateBy({ + name: IS_CURRENCY, + constraints: [options], + validator: { + validate: function (value, args) { return isCurrency(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a currency"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsCurrency.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js.map new file mode 100644 index 0000000..d45d2b0 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsCurrency.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsCurrency.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,WAAW,GAAG,YAAY,CAAC;AAExC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc,EAAE,OAAuC;IAC9E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC/E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,OAAuC,EAAE,iBAAqC;IACrG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAtC,CAAsC;YACjE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,8BAA8B,EAA3C,CAA2C,EAC3D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsCurrency.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js b/src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js new file mode 100644 index 0000000..de7379c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_DATA_URI = "isDataURI"; +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +export function isDataURI(value) { + return typeof value === "string" && validator.isDataURI(value); +} +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +export function IsDataURI(validationOptions) { + return ValidateBy({ + name: IS_DATA_URI, + validator: { + validate: function (value, args) { return isDataURI(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a data uri format"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDataURI.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js.map new file mode 100644 index 0000000..4798a26 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsDataURI.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsDataURI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,WAAW,GAAG,WAAW,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,EAAhB,CAAgB;YAC3C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,qCAAqC,EAAlD,CAAkD,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDataURI.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsDateString.js b/src/node_modules/class-validator/esm5/decorator/string/IsDateString.js new file mode 100644 index 0000000..8ca50be --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsDateString.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_DATE_STRING = "isDateString"; +/** + * Checks if a given value is a ISOString date. + */ +export function isDateString(value) { + var 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; + return typeof value === "string" && regex.test(value); +} +/** + * Checks if a given value is a ISOString date. + */ +export function IsDateString(validationOptions) { + return ValidateBy({ + name: IS_DATE_STRING, + validator: { + validate: function (value, args) { return isDateString(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a ISOString"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDateString.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsDateString.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsDateString.js.map new file mode 100644 index 0000000..d0d29ba --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsDateString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsDateString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,IAAM,KAAK,GAAG,6FAA6F,CAAC;IAC5G,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,iBAAqC;IAC9D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,CAAC,EAAnB,CAAmB;YAC9C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+BAA+B,EAA5C,CAA4C,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDateString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js b/src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js new file mode 100644 index 0000000..1543fb8 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_DECIMAL = "isDecimal"; +/** + * Checks if the string is a valid decimal. + * If given value is not a string, then it returns false. + */ +export function isDecimal(value, options) { + return typeof value === "string" && ValidatorJS.isDecimal(value, options); +} +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export function IsDecimal(options, validationOptions) { + return ValidateBy({ + name: IS_DECIMAL, + constraints: [options], + validator: { + validate: function (value, args) { return isDecimal(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property is not a valid decimal number."; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDecimal.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js.map new file mode 100644 index 0000000..698d999 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsDecimal.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsDecimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,OAAsC;IAC5E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,OAAsC,EAAE,iBAAqC;IACnG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC;YAChE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,0CAA0C,EAAvD,CAAuD,EACvE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDecimal.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsEAN.js b/src/node_modules/class-validator/esm5/decorator/string/IsEAN.js new file mode 100644 index 0000000..523edd9 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsEAN.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_EAN = "isEAN"; +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +export function isEAN(value) { + return typeof value === "string" && validator.isEAN(value); +} +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +export function IsEAN(validationOptions) { + return ValidateBy({ + name: IS_EAN, + validator: { + validate: function (value, args) { return isEAN(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an EAN (European Article Number)"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEAN.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsEAN.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsEAN.js.map new file mode 100644 index 0000000..5374912 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsEAN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsEAN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,EAAZ,CAAY;YACvC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,oDAAoD,EAAjE,CAAiE,EACjF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEAN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsEmail.js b/src/node_modules/class-validator/esm5/decorator/string/IsEmail.js new file mode 100644 index 0000000..6d976f2 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsEmail.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_EMAIL = "isEmail"; +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +export function isEmail(value, options) { + return typeof value === "string" && ValidatorJS.isEmail(value, options); +} +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +export function IsEmail(options, validationOptions) { + return ValidateBy({ + name: IS_EMAIL, + constraints: [options], + validator: { + validate: function (value, args) { return isEmail(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an email"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEmail.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsEmail.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsEmail.js.map new file mode 100644 index 0000000..10b9c84 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsEmail.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsEmail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,OAAoC;IACxE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,OAAoC,EAAE,iBAAqC;IAC/F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAnC,CAAmC;YAC9D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,4BAA4B,EAAzC,CAAyC,EACzD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEmail.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js b/src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js new file mode 100644 index 0000000..356ef03 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_ETHEREUM_ADDRESS = "isEthereumAddress"; +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +export function isEthereumAddress(value) { + return typeof value === "string" && validator.isEthereumAddress(value); +} +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +export function IsEthereumAddress(validationOptions) { + return ValidateBy({ + name: IS_ETHEREUM_ADDRESS, + validator: { + validate: function (value, args) { return isEthereumAddress(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an Ethereum address"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEthereumAddress.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js.map new file mode 100644 index 0000000..8734d17 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsEthereumAddress.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsEthereumAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEvD;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,iBAAqC;IACnE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,iBAAiB,CAAC,KAAK,CAAC,EAAxB,CAAwB;YACnD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,uCAAuC,EAApD,CAAoD,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEthereumAddress.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js b/src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js new file mode 100644 index 0000000..493db73 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_FQDN = "isFqdn"; +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +export function isFQDN(value, options) { + return typeof value === "string" && ValidatorJS.isFQDN(value, options); +} +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +export function IsFQDN(options, validationOptions) { + return ValidateBy({ + name: IS_FQDN, + constraints: [options], + validator: { + validate: function (value, args) { return isFQDN(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid domain name"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsFQDN.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js.map new file mode 100644 index 0000000..baee48b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsFQDN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsFQDN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAmC;IACtE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAmC,EAAE,iBAAqC;IAC7F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC;YAC7D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,uCAAuC,EAApD,CAAoD,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsFQDN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js b/src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js new file mode 100644 index 0000000..c03266b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_FIREBASE_PUSH_ID = "IsFirebasePushId"; +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +export function isFirebasePushId(value) { + var webSafeRegex = /^[a-zA-Z0-9_-]*$/; + return typeof value === "string" && value.length === 20 && webSafeRegex.test(value); +} +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +export function IsFirebasePushId(validationOptions) { + return ValidateBy({ + name: IS_FIREBASE_PUSH_ID, + validator: { + validate: function (value, args) { return isFirebasePushId(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a Firebase Push Id"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsFirebasePushId.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js.map new file mode 100644 index 0000000..ae2bdb2 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsFirebasePushId.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsFirebasePushId.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,IAAM,YAAY,GAAG,kBAAkB,CAAC;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,gBAAgB,CAAC,KAAK,CAAC,EAAvB,CAAuB;YAClD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,sCAAsC,EAAnD,CAAmD,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsFirebasePushId.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js b/src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js new file mode 100644 index 0000000..8cbfd2d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_FULL_WIDTH = "isFullWidth"; +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export function isFullWidth(value) { + return typeof value === "string" && validator.isFullWidth(value); +} +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export function IsFullWidth(validationOptions) { + return ValidateBy({ + name: IS_FULL_WIDTH, + validator: { + validate: function (value, args) { return isFullWidth(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a full-width characters"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsFullWidth.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js.map new file mode 100644 index 0000000..4855482 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsFullWidth.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsFullWidth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,aAAa,GAAG,aAAa,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gDAAgD,EAA7D,CAA6D,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsFullWidth.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHSL.js b/src/node_modules/class-validator/esm5/decorator/string/IsHSL.js new file mode 100644 index 0000000..140304b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHSL.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_HSL = "isHSL"; +/** +* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +export function isHSL(value) { + return typeof value === "string" && validator.isHSL(value); +} +/** + * Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +export function IsHSL(validationOptions) { + return ValidateBy({ + name: IS_HSL, + validator: { + validate: function (value, args) { return isHSL(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a HSL color"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHSL.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHSL.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsHSL.js.map new file mode 100644 index 0000000..b9b8784 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHSL.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHSL.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,EAAZ,CAAY;YACvC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+BAA+B,EAA5C,CAA4C,EAC5D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHSL.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js b/src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js new file mode 100644 index 0000000..c50f05d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_HALF_WIDTH = "isHalfWidth"; +/** + * Checks if the string contains any half-width chars. + * If given value is not a string, then it returns false. + */ +export function isHalfWidth(value) { + return typeof value === "string" && validator.isHalfWidth(value); +} +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export function IsHalfWidth(validationOptions) { + return ValidateBy({ + name: IS_HALF_WIDTH, + validator: { + validate: function (value, args) { return isHalfWidth(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a half-width characters"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHalfWidth.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js.map new file mode 100644 index 0000000..7d69710 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHalfWidth.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHalfWidth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,aAAa,GAAG,aAAa,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gDAAgD,EAA7D,CAA6D,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHalfWidth.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHash.js b/src/node_modules/class-validator/esm5/decorator/string/IsHash.js new file mode 100644 index 0000000..74e918d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHash.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_HASH = "isHash"; +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +export function isHash(value, algorithm) { + return typeof value === "string" && ValidatorJS.isHash(value, algorithm); +} +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +export function IsHash(algorithm, validationOptions) { + return ValidateBy({ + name: IS_HASH, + constraints: [algorithm], + validator: { + validate: function (value, args) { return isHash(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a hash of type $constraint1"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHash.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHash.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsHash.js.map new file mode 100644 index 0000000..06b825f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHash.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,SAAoC;IACvE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC7E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,SAAiB,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,SAAS,CAAC;QACxB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC;YAC7D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+CAA+C,EAA5D,CAA4D,EAC5E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHash.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js b/src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js new file mode 100644 index 0000000..2ee216c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_HEX_COLOR = "isHexColor"; +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +export function isHexColor(value) { + return typeof value === "string" && validator.isHexColor(value); +} +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +export function IsHexColor(validationOptions) { + return ValidateBy({ + name: IS_HEX_COLOR, + validator: { + validate: function (value, args) { return isHexColor(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a hexadecimal color"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHexColor.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js.map new file mode 100644 index 0000000..6c0cb0f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHexColor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHexColor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB;YAC5C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,uCAAuC,EAApD,CAAoD,EACpE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHexColor.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js b/src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js new file mode 100644 index 0000000..14a45e1 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_HEXADECIMAL = "isHexadecimal"; +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +export function isHexadecimal(value) { + return typeof value === "string" && validator.isHexadecimal(value); +} +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +export function IsHexadecimal(validationOptions) { + return ValidateBy({ + name: IS_HEXADECIMAL, + validator: { + validate: function (value, args) { return isHexadecimal(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a hexadecimal number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsHexadecimal.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js.map new file mode 100644 index 0000000..54a24af --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsHexadecimal.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsHexadecimal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,cAAc,GAAG,eAAe,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,iBAAqC;IAC/D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,aAAa,CAAC,KAAK,CAAC,EAApB,CAAoB;YAC/C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,wCAAwC,EAArD,CAAqD,EACrE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsHexadecimal.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js b/src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js new file mode 100644 index 0000000..61bb700 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_IBAN = "isIBAN"; +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +export function isIBAN(value) { + return typeof value === "string" && validator.isIBAN(value); +} +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +export function IsIBAN(validationOptions) { + return ValidateBy({ + name: IS_IBAN, + validator: { + validate: function (value, args) { return isIBAN(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an IBAN"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIBAN.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js.map new file mode 100644 index 0000000..a24a2c3 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsIBAN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsIBAN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa;YACxC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,2BAA2B,EAAxC,CAAwC,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIBAN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsIP.js b/src/node_modules/class-validator/esm5/decorator/string/IsIP.js new file mode 100644 index 0000000..1466282 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsIP.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_IP = "isIp"; +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +export function isIP(value, version) { + var versionStr = version ? "" + version : undefined; + return typeof value === "string" && ValidatorJS.isIP(value, versionStr); +} +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +export function IsIP(version, validationOptions) { + return ValidateBy({ + name: IS_IP, + constraints: [version], + validator: { + validate: function (value, args) { return isIP(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ip address"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIP.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsIP.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsIP.js.map new file mode 100644 index 0000000..295d92f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsIP.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsIP.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,IAAM,KAAK,GAAG,MAAM,CAAC;AAE5B;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,KAAc,EAAE,OAAqB;IACtD,IAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAE,KAAG,OAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;IACrE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,OAAqB,EAAE,iBAAqC;IAC7E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAhC,CAAgC;YAC3D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iCAAiC,EAA9C,CAA8C,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIP.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISBN.js b/src/node_modules/class-validator/esm5/decorator/string/IsISBN.js new file mode 100644 index 0000000..9ed8ae2 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISBN.js @@ -0,0 +1,27 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_ISBN = "isIsbn"; +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +export function isISBN(value, version) { + var versionStr = version ? "" + version : undefined; + return typeof value === "string" && ValidatorJS.isISBN(value, versionStr); +} +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +export function IsISBN(version, validationOptions) { + return ValidateBy({ + name: IS_ISBN, + constraints: [version], + validator: { + validate: function (value, args) { return isISBN(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ISBN"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISBN.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISBN.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsISBN.js.map new file mode 100644 index 0000000..c8ae303 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISBN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISBN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAIpC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAuB;IAC1D,IAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAE,KAAG,OAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAuB,EAAE,iBAAqC;IACjF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC;YAC7D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,2BAA2B,EAAxC,CAAwC,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISBN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISIN.js b/src/node_modules/class-validator/esm5/decorator/string/IsISIN.js new file mode 100644 index 0000000..826e398 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISIN.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_ISIN = "isIsin"; +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +export function isISIN(value) { + return typeof value === "string" && validator.isISIN(value); +} +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +export function IsISIN(validationOptions) { + return ValidateBy({ + name: IS_ISIN, + validator: { + validate: function (value, args) { return isISIN(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ISIN (stock/security identifier)"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISIN.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISIN.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsISIN.js.map new file mode 100644 index 0000000..152ad70 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISIN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISIN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa;YACxC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,uDAAuD,EAApE,CAAoE,EACpF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISIN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js new file mode 100644 index 0000000..8425607 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_ISO31661_ALPHA_2 = "isISO31661Alpha2"; +/** + * 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. + */ +export function isISO31661Alpha2(value) { + return typeof value === "string" && validator.isISO31661Alpha2(value); +} +/** + * 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. + */ +export function IsISO31661Alpha2(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_2, + validator: { + validate: function (value, args) { return isISO31661Alpha2(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid ISO31661 Alpha2 code"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISO31661Alpha2.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js.map new file mode 100644 index 0000000..ac12411 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISO31661Alpha2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,gBAAgB,CAAC,KAAK,CAAC,EAAvB,CAAuB;YAClD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gDAAgD,EAA7D,CAA6D,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISO31661Alpha2.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js new file mode 100644 index 0000000..fdb583b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_ISO31661_ALPHA_3 = "isISO31661Alpha3"; +/** + * 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. + */ +export function isISO31661Alpha3(value) { + return typeof value === "string" && validator.isISO31661Alpha3(value); +} +/** + * 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. + */ +export function IsISO31661Alpha3(validationOptions) { + return ValidateBy({ + name: IS_ISO31661_ALPHA_3, + validator: { + validate: function (value, args) { return isISO31661Alpha3(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid ISO31661 Alpha3 code"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISO31661Alpha3.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js.map new file mode 100644 index 0000000..1ace7f6 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISO31661Alpha3.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISO31661Alpha3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAEtD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,iBAAqC;IAClE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,gBAAgB,CAAC,KAAK,CAAC,EAAvB,CAAuB;YAClD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gDAAgD,EAA7D,CAA6D,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISO31661Alpha3.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js b/src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js new file mode 100644 index 0000000..988d9fc --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_ISO8601 = "isIso8601"; +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +export function isISO8601(value, options) { + return typeof value === "string" && ValidatorJS.isISO8601(value, options); +} +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +export function IsISO8601(options, validationOptions) { + return ValidateBy({ + name: IS_ISO8601, + constraints: [options], + validator: { + validate: function (value, args) { return isISO8601(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid ISO 8601 date string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISO8601.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js.map new file mode 100644 index 0000000..6b9efea --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISO8601.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISO8601.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,OAAsC;IAC5E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,OAAsC,EAAE,iBAAqC;IACnG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC;YAChE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gDAAgD,EAA7D,CAA6D,EAC7E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISO8601.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISRC.js b/src/node_modules/class-validator/esm5/decorator/string/IsISRC.js new file mode 100644 index 0000000..27b5212 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISRC.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_ISRC = "isISRC"; +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +export function isISRC(value) { + return typeof value === "string" && validator.isISRC(value); +} +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +export function IsISRC(validationOptions) { + return ValidateBy({ + name: IS_ISRC, + validator: { + validate: function (value, args) { return isISRC(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an ISRC"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISRC.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISRC.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsISRC.js.map new file mode 100644 index 0000000..6da2a49 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISRC.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISRC.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa;YACxC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,2BAA2B,EAAxC,CAAwC,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISRC.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISSN.js b/src/node_modules/class-validator/esm5/decorator/string/IsISSN.js new file mode 100644 index 0000000..1242bf6 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISSN.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_ISSN = "isISSN"; +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +export function isISSN(value, options) { + return typeof value === "string" && ValidatorJS.isISSN(value, options); +} +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +export function IsISSN(options, validationOptions) { + return ValidateBy({ + name: IS_ISSN, + constraints: [options], + validator: { + validate: function (value, args) { return isISSN(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a ISSN"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsISSN.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsISSN.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsISSN.js.map new file mode 100644 index 0000000..0de208d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsISSN.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsISSN.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAmC;IACtE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAmC,EAAE,iBAAqC;IAC7F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC;YAC7D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,0BAA0B,EAAvC,CAAuC,EACvD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsISSN.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js b/src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js new file mode 100644 index 0000000..d5ac062 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js @@ -0,0 +1,30 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_IDENTITY_CARD = "isIdentityCard"; +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +export function isIdentityCard(value, locale) { + return typeof value === "string" && ValidatorJS.isIdentityCard(value, locale); +} +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +export function IsIdentityCard(locale, validationOptions) { + return ValidateBy({ + name: IS_IDENTITY_CARD, + constraints: [locale], + validator: { + validate: function (value, args) { return isIdentityCard(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a identity card number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsIdentityCard.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js.map new file mode 100644 index 0000000..afa51dc --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsIdentityCard.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsIdentityCard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,MAAsC;IACjF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAClF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,MAAuC,EAAE,iBAAqC;IACzG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA1C,CAA0C;YACrE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,0CAA0C,EAAvD,CAAuD,EACvE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsIdentityCard.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsJSON.js b/src/node_modules/class-validator/esm5/decorator/string/IsJSON.js new file mode 100644 index 0000000..e71990f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsJSON.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_JSON = "isJson"; +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +export function isJSON(value) { + return typeof value === "string" && validator.isJSON(value); +} +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +export function IsJSON(validationOptions) { + return ValidateBy({ + name: IS_JSON, + validator: { + validate: function (value, args) { return isJSON(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a json string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsJSON.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsJSON.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsJSON.js.map new file mode 100644 index 0000000..9502373 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsJSON.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsJSON.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa;YACxC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iCAAiC,EAA9C,CAA8C,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsJSON.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsJWT.js b/src/node_modules/class-validator/esm5/decorator/string/IsJWT.js new file mode 100644 index 0000000..dd6f6a3 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsJWT.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_JWT = "isJwt"; +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +export function isJWT(value) { + return typeof value === "string" && validator.isJWT(value); +} +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +export function IsJWT(validationOptions) { + return ValidateBy({ + name: IS_JWT, + validator: { + validate: function (value, args) { return isJWT(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a jwt string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsJWT.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsJWT.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsJWT.js.map new file mode 100644 index 0000000..d9c3db9 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsJWT.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsJWT.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,EAAZ,CAAY;YACvC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gCAAgC,EAA7C,CAA6C,EAC7D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsJWT.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsLocale.js b/src/node_modules/class-validator/esm5/decorator/string/IsLocale.js new file mode 100644 index 0000000..11f9f52 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsLocale.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_LOCALE = "isLocale"; +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +export function isLocale(value) { + return typeof value === "string" && validator.isLocale(value); +} +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +export function IsLocale(validationOptions) { + return ValidateBy({ + name: IS_LOCALE, + validator: { + validate: function (value, args) { return isLocale(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be locale"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLocale.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsLocale.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsLocale.js.map new file mode 100644 index 0000000..154e67b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsLocale.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsLocale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe;YAC1C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,0BAA0B,EAAvC,CAAuC,EACvD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLocale.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js b/src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js new file mode 100644 index 0000000..bf76c8f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_LOWERCASE = "isLowercase"; +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +export function isLowercase(value) { + return typeof value === "string" && validator.isLowercase(value); +} +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +export function IsLowercase(validationOptions) { + return ValidateBy({ + name: IS_LOWERCASE, + validator: { + validate: function (value, args) { return isLowercase(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a lowercase string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsLowercase.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js.map new file mode 100644 index 0000000..9673262 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsLowercase.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsLowercase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,sCAAsC,EAAnD,CAAmD,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsLowercase.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js b/src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js new file mode 100644 index 0000000..1d5c526 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js @@ -0,0 +1,25 @@ +import { isValidationOptions } from "../ValidationOptions"; +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_MAC_ADDRESS = "isMacAddress"; +/** + * Check if the string is a MAC address. + * If given value is not a string, then it returns false. + */ +export function isMACAddress(value, options) { + return typeof value === "string" && ValidatorJS.isMACAddress(value, options); +} +export function IsMACAddress(optionsOrValidationOptionsArg, validationOptionsArg) { + var options = !isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : undefined; + var validationOptions = isValidationOptions(optionsOrValidationOptionsArg) ? optionsOrValidationOptionsArg : validationOptionsArg; + return ValidateBy({ + name: IS_MAC_ADDRESS, + constraints: [options], + validator: { + validate: function (value, args) { return isMACAddress(value, options); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a MAC Address"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMacAddress.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js.map new file mode 100644 index 0000000..ad00328 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMacAddress.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMacAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,OAAyC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACjF,CAAC;AAQD,MAAM,UAAU,YAAY,CAAC,6BAAmF,EAAE,oBAAwC;IACtJ,IAAM,OAAO,GAAG,CAAC,mBAAmB,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC;IAChH,IAAM,iBAAiB,GAAG,mBAAmB,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,oBAAoB,CAAC;IAEpI,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,EAA5B,CAA4B;YACvD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iCAAiC,EAA9C,CAA8C,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMacAddress.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js b/src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js new file mode 100644 index 0000000..cd8932f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_MAGNET_URI = "isMagnetURI"; +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +export function isMagnetURI(value) { + return typeof value === "string" && validator.isMagnetURI(value); +} +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +export function IsMagnetURI(validationOptions) { + return ValidateBy({ + name: IS_MAGNET_URI, + validator: { + validate: function (value, args) { return isMagnetURI(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be magnet uri format"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMagnetURI.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js.map new file mode 100644 index 0000000..d03f2e5 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMagnetURI.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMagnetURI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,aAAa,GAAG,aAAa,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,qCAAqC,EAAlD,CAAkD,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMagnetURI.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js b/src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js new file mode 100644 index 0000000..c7ece57 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_MILITARY_TIME = "isMilitaryTime"; +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +export function isMilitaryTime(value) { + var militaryTimeRegex = /^([01]\d|2[0-3]):?([0-5]\d)$/; + return typeof value === "string" && validator.matches(value, militaryTimeRegex); +} +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +export function IsMilitaryTime(validationOptions) { + return ValidateBy({ + name: IS_MILITARY_TIME, + validator: { + validate: function (value, args) { return isMilitaryTime(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid representation of military time in the format HH:MM"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMilitaryTime.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js.map new file mode 100644 index 0000000..9f3f967 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMilitaryTime.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMilitaryTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IACzC,IAAM,iBAAiB,GAAG,8BAA8B,CAAC;IACzD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,iBAAqC;IAChE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,cAAc,CAAC,KAAK,CAAC,EAArB,CAAqB;YAChD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+EAA+E,EAA5F,CAA4F,EAC5G,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMilitaryTime.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js b/src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js new file mode 100644 index 0000000..d84412e --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_MIME_TYPE = "isMimeType"; +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +export function isMimeType(value) { + return typeof value === "string" && validator.isMimeType(value); +} +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +export function IsMimeType(validationOptions) { + return ValidateBy({ + name: IS_MIME_TYPE, + validator: { + validate: function (value, args) { return isMimeType(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be MIME type format"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMimeType.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js.map new file mode 100644 index 0000000..4e3d8e0 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMimeType.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMimeType.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,iBAAqC;IAC5D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB;YAC5C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,oCAAoC,EAAjD,CAAiD,EACjE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMimeType.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js b/src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js new file mode 100644 index 0000000..193e94d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js @@ -0,0 +1,42 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_MOBILE_PHONE = "isMobilePhone"; +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +export function isMobilePhone(value, locale, options) { + return typeof value === "string" && validator.isMobilePhone(value, locale, options); +} +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +export function IsMobilePhone(locale, options, validationOptions) { + return ValidateBy({ + name: IS_MOBILE_PHONE, + constraints: [locale, options], + validator: { + validate: function (value, args) { return isMobilePhone(value, args.constraints[0], args.constraints[1]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a phone number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMobilePhone.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js.map new file mode 100644 index 0000000..691a045 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMobilePhone.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMobilePhone.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc,EAAE,MAAoC,EAAE,OAAwC;IACxH,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACxF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,MAAoC,EAAE,OAAwC,EAAE,iBAAqC;IAC/I,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QAC9B,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA9D,CAA8D;YACzF,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,kCAAkC,EAA/C,CAA+C,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMobilePhone.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js b/src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js new file mode 100644 index 0000000..52b89c5 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_MONGO_ID = "isMongoId"; +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +export function isMongoId(value) { + return typeof value === "string" && validator.isMongoId(value); +} +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +export function IsMongoId(validationOptions) { + return ValidateBy({ + name: IS_MONGO_ID, + validator: { + validate: function (value, args) { return isMongoId(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a mongodb id"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMongoId.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js.map new file mode 100644 index 0000000..86d7c00 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMongoId.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMongoId.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,WAAW,GAAG,WAAW,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,EAAhB,CAAgB;YAC3C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,gCAAgC,EAA7C,CAA6C,EAC7D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMongoId.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js b/src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js new file mode 100644 index 0000000..e44ab8e --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_MULTIBYTE = "isMultibyte"; +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +export function isMultibyte(value) { + return typeof value === "string" && validator.isMultibyte(value); +} +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +export function IsMultibyte(validationOptions) { + return ValidateBy({ + name: IS_MULTIBYTE, + validator: { + validate: function (value, args) { return isMultibyte(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain one or more multibyte chars"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsMultibyte.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js.map new file mode 100644 index 0000000..16e49b4 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsMultibyte.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsMultibyte.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,oDAAoD,EAAjE,CAAiE,EACjF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsMultibyte.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js b/src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js new file mode 100644 index 0000000..3ba2a88 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_NUMBER_STRING = "isNumberString"; +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +export function isNumberString(value, options) { + return typeof value === "string" && ValidatorJS.isNumeric(value, options); +} +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +export function IsNumberString(options, validationOptions) { + return ValidateBy({ + name: IS_NUMBER_STRING, + constraints: [options], + validator: { + validate: function (value, args) { return isNumberString(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a number string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNumberString.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js.map new file mode 100644 index 0000000..e40939f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsNumberString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsNumberString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,OAAsC;IACjF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,OAAsC,EAAE,iBAAqC;IACxG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA1C,CAA0C;YACrE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,mCAAmC,EAAhD,CAAgD,EAChE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNumberString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsOctal.js b/src/node_modules/class-validator/esm5/decorator/string/IsOctal.js new file mode 100644 index 0000000..54c935c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsOctal.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_OCTAL = "isOctal"; +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +export function isOctal(value) { + return typeof value === "string" && validator.isOctal(value); +} +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +export function IsOctal(validationOptions) { + return ValidateBy({ + name: IS_OCTAL, + validator: { + validate: function (value, args) { return isOctal(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be valid octal number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsOctal.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsOctal.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsOctal.js.map new file mode 100644 index 0000000..ba1fcbd --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsOctal.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsOctal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc;YACzC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,sCAAsC,EAAnD,CAAmD,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsOctal.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js b/src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js new file mode 100644 index 0000000..5d0d78c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_PASSPORT_NUMBER = "isPassportNumber"; +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +export function isPassportNumber(value, countryCode) { + return typeof value === "string" && validator.isPassportNumber(value, countryCode); +} +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +export function IsPassportNumber(countryCode, validationOptions) { + return ValidateBy({ + name: IS_PASSPORT_NUMBER, + constraints: [countryCode], + validator: { + validate: function (value, args) { return isPassportNumber(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be valid passport number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPassportNumber.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js.map new file mode 100644 index 0000000..1001732 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPassportNumber.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPassportNumber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,WAAmB;IAChE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AACvF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB,EAAE,iBAAqC;IACvF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,CAAC,WAAW,CAAC;QAC1B,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAA5C,CAA4C;YACvE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,yCAAyC,EAAtD,CAAsD,EACtE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPassportNumber.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js b/src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js new file mode 100644 index 0000000..e97c194 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js @@ -0,0 +1,40 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import { PhoneNumberUtil } from "google-libphonenumber"; +export var IS_PHONE_NUMBER = "isPhoneNumber"; +/** + * Checks if the string is a valid phone number. + * @param value the potential phone number string to test + * @param {string} region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +export function isPhoneNumber(value, region) { + var phoneUtil = PhoneNumberUtil.getInstance(); + try { + var phoneNum = phoneUtil.parseAndKeepRawInput(value, region); + var result = phoneUtil.isValidNumber(phoneNum); + return result; + } + catch (error) { + // logging? + return false; + } +} +/** + * Checks if the string is a valid phone number. + * @param region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +export function IsPhoneNumber(region, validationOptions) { + return ValidateBy({ + name: IS_PHONE_NUMBER, + constraints: [region], + validator: { + validate: function (value, args) { return isPhoneNumber(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid phone number"; }, validationOptions), + } + }, validationOptions); +} + +//# sourceMappingURL=IsPhoneNumber.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js.map new file mode 100644 index 0000000..c2d722f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPhoneNumber.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPhoneNumber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,CAAC,IAAM,eAAe,GAAG,eAAe,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa,EAAE,MAAqB;IAC9D,IAAM,SAAS,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;IAChD,IAAI;QACA,IAAM,QAAQ,GAAG,SAAS,CAAC,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC/D,IAAM,MAAM,GAAG,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjD,OAAO,MAAM,CAAC;KACjB;IAAC,OAAO,KAAK,EAAE;QACZ,WAAW;QACX,OAAO,KAAK,CAAC;KAChB;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,MAAqB,EAAE,iBAAqC;IACtF,OAAO,UAAU,CACb;QACI,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAzC,CAAyC;YACpE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,wCAAwC,EAArD,CAAqD,EACrE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPhoneNumber.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPort.js b/src/node_modules/class-validator/esm5/decorator/string/IsPort.js new file mode 100644 index 0000000..c9dd7b0 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPort.js @@ -0,0 +1,23 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_PORT = "isPort"; +/** + * Check if the string is a valid port number. + */ +export function isPort(value) { + return typeof value === "string" && validator.isPort(value); +} +/** + * Check if the string is a valid port number. + */ +export function IsPort(validationOptions) { + return ValidateBy({ + name: IS_PORT, + validator: { + validate: function (value, args) { return isPort(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a port"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPort.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPort.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsPort.js.map new file mode 100644 index 0000000..238cbee --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPort.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPort.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa;YACxC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,0BAA0B,EAAvC,CAAuC,EACvD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPort.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js b/src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js new file mode 100644 index 0000000..81b7ea6 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_POSTAL_CODE = "isPostalCode"; +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +export function isPostalCode(value, locale) { + return typeof value === "string" && validator.isPostalCode(value, locale); +} +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +export function IsPostalCode(locale, validationOptions) { + return ValidateBy({ + name: IS_POSTAL_CODE, + constraints: [locale], + validator: { + validate: function (value, args) { return isPostalCode(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a postal code"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsPostalCode.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js.map new file mode 100644 index 0000000..9c72b32 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsPostalCode.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsPostalCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,cAAc,GAAG,cAAc,CAAC;AAE7C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc,EAAE,MAAkC;IAC3E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,MAAmC,EAAE,iBAAqC;IACnG,OAAO,UAAU,CACb;QACI,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAxC,CAAwC;YACnE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iCAAiC,EAA9C,CAA8C,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsPostalCode.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js b/src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js new file mode 100644 index 0000000..4fb23aa --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_RFC_3339 = "isRFC3339"; +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +export function isRFC3339(value) { + return typeof value === "string" && validator.isRFC3339(value); +} +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +export function IsRFC3339(validationOptions) { + return ValidateBy({ + name: IS_RFC_3339, + validator: { + validate: function (value, args) { return isRFC3339(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be RFC 3339 date"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsRFC3339.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js.map new file mode 100644 index 0000000..10df7bc --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsRFC3339.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsRFC3339.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,WAAW,GAAG,WAAW,CAAC;AAEvC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,EAAhB,CAAgB;YAC3C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,iCAAiC,EAA9C,CAA8C,EAC9D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsRFC3339.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js b/src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js new file mode 100644 index 0000000..ecf381b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js @@ -0,0 +1,28 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_RGB_COLOR = "isRgbColor"; +/** +* Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +export function isRgbColor(value, includePercentValues) { + return typeof value === "string" && validator.isRgbColor(value, includePercentValues); +} +/** + * Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +export function IsRgbColor(includePercentValues, validationOptions) { + return ValidateBy({ + name: IS_RGB_COLOR, + constraints: [includePercentValues], + validator: { + validate: function (value, args) { return isRgbColor(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be RGB color"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsRgbColor.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js.map new file mode 100644 index 0000000..3bed38c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsRgbColor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsRgbColor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,YAAY,GAAG,YAAY,CAAC;AAEzC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc,EAAE,oBAA8B;IACrE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC;AAC1F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,oBAA8B,EAAE,iBAAqC;IAC5F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,CAAC,oBAAoB,CAAC;QACnC,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAtC,CAAsC;YACjE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,6BAA6B,EAA1C,CAA0C,EAC1D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsRgbColor.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js b/src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js new file mode 100644 index 0000000..3e4926b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_SEM_VER = "isSemVer"; +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +export function isSemVer(value) { + return typeof value === "string" && validator.isSemVer(value); +} +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +export function IsSemVer(validationOptions) { + return ValidateBy({ + name: IS_SEM_VER, + validator: { + validate: function (value, args) { return isSemVer(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a Semantic Versioning Specification"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsSemVer.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js.map new file mode 100644 index 0000000..200cb57 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsSemVer.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsSemVer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,UAAU,GAAG,UAAU,CAAC;AAErC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe;YAC1C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,uDAAuD,EAApE,CAAoE,EACpF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsSemVer.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js b/src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js new file mode 100644 index 0000000..aefd616 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_SURROGATE_PAIR = "isSurrogatePair"; +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +export function isSurrogatePair(value) { + return typeof value === "string" && validator.isSurrogatePair(value); +} +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +export function IsSurrogatePair(validationOptions) { + return ValidateBy({ + name: IS_SURROGATE_PAIR, + validator: { + validate: function (value, args) { return isSurrogatePair(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain any surrogate pairs chars"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsSurrogatePair.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js.map new file mode 100644 index 0000000..f4e2f67 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsSurrogatePair.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsSurrogatePair.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,eAAe,CAAC,KAAK,CAAC,EAAtB,CAAsB;YACjD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,kDAAkD,EAA/D,CAA+D,EAC/E,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsSurrogatePair.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsUUID.js b/src/node_modules/class-validator/esm5/decorator/string/IsUUID.js new file mode 100644 index 0000000..e24945c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsUUID.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_UUID = "isUuid"; +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +export function isUUID(value, version) { + return typeof value === "string" && validator.isUUID(value, version); +} +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +export function IsUUID(version, validationOptions) { + return ValidateBy({ + name: IS_UUID, + constraints: [version], + validator: { + validate: function (value, args) { return isUUID(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an UUID"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsUUID.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsUUID.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsUUID.js.map new file mode 100644 index 0000000..c9bf700 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsUUID.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsUUID.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,OAAqB;IACxD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAqB,EAAE,iBAAqC;IAC/E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC;YAC7D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,2BAA2B,EAAxC,CAAwC,EACxD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsUUID.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js b/src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js new file mode 100644 index 0000000..da62e7f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_UPPERCASE = "isUppercase"; +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +export function isUppercase(value) { + return typeof value === "string" && validator.isUppercase(value); +} +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +export function IsUppercase(validationOptions) { + return ValidateBy({ + name: IS_UPPERCASE, + validator: { + validate: function (value, args) { return isUppercase(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be uppercase"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsUppercase.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js.map new file mode 100644 index 0000000..74524b5 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsUppercase.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsUppercase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,iBAAqC;IAC7D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,CAAC,EAAlB,CAAkB;YAC7C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,6BAA6B,EAA1C,CAA0C,EAC1D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsUppercase.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsUrl.js b/src/node_modules/class-validator/esm5/decorator/string/IsUrl.js new file mode 100644 index 0000000..cc8743a --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsUrl.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import ValidatorJS from "validator"; +export var IS_URL = "isUrl"; +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +export function isURL(value, options) { + return typeof value === "string" && ValidatorJS.isURL(value, options); +} +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +export function IsUrl(options, validationOptions) { + return ValidateBy({ + name: IS_URL, + constraints: [options], + validator: { + validate: function (value, args) { return isURL(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an URL address"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsUrl.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsUrl.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsUrl.js.map new file mode 100644 index 0000000..4157963 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsUrl.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,OAAkC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,KAAK,CAAC,OAAkC,EAAE,iBAAqC;IAC3F,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAjC,CAAiC;YAC5D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,kCAAkC,EAA/C,CAA+C,EAC/D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsUrl.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js b/src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js new file mode 100644 index 0000000..d16a578 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var IS_VARIABLE_WIDTH = "isVariableWidth"; +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +export function isVariableWidth(value) { + return typeof value === "string" && validator.isVariableWidth(value); +} +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +export function IsVariableWidth(validationOptions) { + return ValidateBy({ + name: IS_VARIABLE_WIDTH, + validator: { + validate: function (value, args) { return isVariableWidth(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must contain a full-width and half-width characters"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsVariableWidth.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js.map b/src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js.map new file mode 100644 index 0000000..1676140 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/IsVariableWidth.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/IsVariableWidth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACjE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,iBAAiB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,eAAe,CAAC,KAAK,CAAC,EAAtB,CAAsB;YACjD,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,+DAA+D,EAA5E,CAA4E,EAC5F,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsVariableWidth.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/Length.js b/src/node_modules/class-validator/esm5/decorator/string/Length.js new file mode 100644 index 0000000..6f161c8 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/Length.js @@ -0,0 +1,36 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var LENGTH = "length"; +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function length(value, min, max) { + return typeof value === "string" && validator.isLength(value, { min: min, max: max }); +} +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function Length(min, max, validationOptions) { + return ValidateBy({ + name: LENGTH, + constraints: [min, max], + validator: { + validate: function (value, args) { return length(value, args.constraints[0], args.constraints[1]); }, + defaultMessage: buildMessage(function (eachPrefix, args) { + var isMinLength = args.constraints[0] !== null && args.constraints[0] !== undefined; + var isMaxLength = args.constraints[1] !== null && args.constraints[1] !== undefined; + if (isMinLength && (!args.value || args.value.length < args.constraints[0])) { + return eachPrefix + "$property must be longer than or equal to $constraint1 characters"; + } + else if (isMaxLength && (args.value.length > args.constraints[1])) { + return eachPrefix + "$property must be shorter than or equal to $constraint2 characters"; + } + return eachPrefix + "$property must be longer than or equal to $constraint1 and shorter than or equal to $constraint2 characters"; + }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Length.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/Length.js.map b/src/node_modules/class-validator/esm5/decorator/string/Length.js.map new file mode 100644 index 0000000..b34fa61 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/Length.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/Length.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,MAAM,GAAG,QAAQ,CAAC;AAE/B;;;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EAAoE,CAAC;iBAC5F;gBACD,OAAO,UAAU,GAAG,6GAA6G,CAAC;YACtI,CAAC,EACD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Length.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/Matches.js b/src/node_modules/class-validator/esm5/decorator/string/Matches.js new file mode 100644 index 0000000..90e238f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/Matches.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var MATCHES = "matches"; +export function matches(value, pattern, modifiers) { + return typeof value === "string" && validator.matches(value, pattern, modifiers); +} +export function Matches(pattern, modifiersOrAnnotationOptions, validationOptions) { + var modifiers; + if (modifiersOrAnnotationOptions && modifiersOrAnnotationOptions instanceof Object && !validationOptions) { + validationOptions = modifiersOrAnnotationOptions; + } + else { + modifiers = modifiersOrAnnotationOptions; + } + return ValidateBy({ + name: MATCHES, + constraints: [pattern, modifiers], + validator: { + validate: function (value, args) { return matches(value, args.constraints[0], args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix, args) { return eachPrefix + "$property must match $constraint1 regular expression"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=Matches.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/Matches.js.map b/src/node_modules/class-validator/esm5/decorator/string/Matches.js.map new file mode 100644 index 0000000..ea99cba --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/Matches.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/Matches.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,OAAO,GAAG,SAAS,CAAC;AAQjC,MAAM,UAAU,OAAO,CAAC,KAAa,EAAE,OAAwB,EAAE,SAAkB;IAC/E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,OAAyB,EAAE,SAAS,CAAC,CAAC;AACvG,CAAC;AAQD,MAAM,UAAU,OAAO,CAAC,OAAwB,EAAE,4BAAyD,EAAE,iBAAqC;IAC9I,IAAI,SAAiB,CAAC;IACtB,IAAI,4BAA4B,IAAI,4BAA4B,YAAY,MAAM,IAAI,CAAC,iBAAiB,EAAE;QACtG,iBAAiB,GAAG,4BAAiD,CAAC;KACzE;SAAM;QACH,SAAS,GAAG,4BAAsC,CAAC;KACtD;IAED,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;QACjC,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAxD,CAAwD;YACnF,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,EAAE,IAAI,IAAK,OAAA,UAAU,GAAG,sDAAsD,EAAnE,CAAmE,EACzF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"Matches.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/MaxLength.js b/src/node_modules/class-validator/esm5/decorator/string/MaxLength.js new file mode 100644 index 0000000..69f5c56 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/MaxLength.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var MAX_LENGTH = "maxLength"; +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function maxLength(value, max) { + return typeof value === "string" && validator.isLength(value, { min: 0, max: max }); +} +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function MaxLength(max, validationOptions) { + return ValidateBy({ + name: MAX_LENGTH, + constraints: [max], + validator: { + validate: function (value, args) { return maxLength(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be shorter than or equal to $constraint1 characters"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MaxLength.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/MaxLength.js.map b/src/node_modules/class-validator/esm5/decorator/string/MaxLength.js.map new file mode 100644 index 0000000..0c7e5d4 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/MaxLength.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/MaxLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,GAAW;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC;AACnF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC;YAChE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,oEAAoE,EAAjF,CAAiF,EACjG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MaxLength.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/MinLength.js b/src/node_modules/class-validator/esm5/decorator/string/MinLength.js new file mode 100644 index 0000000..c141f65 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/MinLength.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var MIN_LENGTH = "minLength"; +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function minLength(value, min) { + return typeof value === "string" && validator.isLength(value, { min: min }); +} +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export function MinLength(min, validationOptions) { + return ValidateBy({ + name: MIN_LENGTH, + constraints: [min], + validator: { + validate: function (value, args) { return minLength(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be longer than or equal to $constraint1 characters"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=MinLength.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/MinLength.js.map b/src/node_modules/class-validator/esm5/decorator/string/MinLength.js.map new file mode 100644 index 0000000..bbb625f --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/MinLength.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/MinLength.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc,EAAE,GAAW;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,GAAG,KAAA,EAAE,CAAC,CAAC;AAC3E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,CAAC,GAAG,CAAC;QAClB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC;YAChE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,mEAAmE,EAAhF,CAAgF,EAChG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"MinLength.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/string/NotContains.js b/src/node_modules/class-validator/esm5/decorator/string/NotContains.js new file mode 100644 index 0000000..fcebeb2 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/NotContains.js @@ -0,0 +1,26 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +import validator from "validator"; +export var NOT_CONTAINS = "notContains"; +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +export function notContains(value, seed) { + return typeof value === "string" && !validator.contains(value, seed); +} +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +export function NotContains(seed, validationOptions) { + return ValidateBy({ + name: NOT_CONTAINS, + constraints: [seed], + validator: { + validate: function (value, args) { return notContains(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property should not contain a $constraint1 string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=NotContains.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/string/NotContains.js.map b/src/node_modules/class-validator/esm5/decorator/string/NotContains.js.map new file mode 100644 index 0000000..50b5366 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/string/NotContains.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/string/NotContains.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,IAAM,YAAY,GAAG,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc,EAAE,IAAY;IACpD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACzE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,iBAAqC;IAC3E,OAAO,UAAU,CACb;QACI,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,CAAC,IAAI,CAAC;QACnB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAvC,CAAuC;YAClE,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,oDAAoD,EAAjE,CAAiE,EACjF,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"NotContains.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js new file mode 100644 index 0000000..42e177d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_ARRAY = "isArray"; +/** + * Checks if a given value is an array + */ +export function isArray(value) { + return value instanceof Array; +} +/** + * Checks if a given value is an array + */ +export function IsArray(validationOptions) { + return ValidateBy({ + name: IS_ARRAY, + validator: { + validate: function (value, args) { return isArray(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an array"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsArray.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js.map new file mode 100644 index 0000000..2af7b83 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsArray.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsArray.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,iBAAqC;IACzD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc;YACzC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,4BAA4B,EAAzC,CAAyC,EACzD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsArray.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js new file mode 100644 index 0000000..1f99333 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_BOOLEAN = "isBoolean"; +/** + * Checks if a given value is a number. + */ +export function isBoolean(value) { + return value instanceof Boolean || typeof value === "boolean"; +} +/** + * Checks if a value is a number. + */ +export function IsBoolean(validationOptions) { + return ValidateBy({ + name: IS_BOOLEAN, + validator: { + validate: function (value, args) { return isBoolean(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a boolean value"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsBoolean.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js.map new file mode 100644 index 0000000..c1d4661 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsBoolean.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsBoolean.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,UAAU,GAAG,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,OAAO,IAAI,OAAO,KAAK,KAAK,SAAS,CAAC;AAClE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,iBAAqC;IAC3D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,SAAS,CAAC,KAAK,CAAC,EAAhB,CAAgB;YAC3C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,mCAAmC,EAAhD,CAAgD,EAChE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsBoolean.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js new file mode 100644 index 0000000..c5aa70d --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_DATE = "isDate"; +/** + * Checks if a given value is a number. + */ +export function isDate(value) { + return value instanceof Date && !isNaN(value.getTime()); +} +/** + * Checks if a value is a number. + */ +export function IsDate(validationOptions) { + return ValidateBy({ + name: IS_DATE, + validator: { + validate: function (value, args) { return isDate(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a Date instance"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsDate.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js.map new file mode 100644 index 0000000..db023a8 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsDate.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsDate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc;IACjC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,iBAAqC;IACxD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,CAAC,EAAb,CAAa;YACxC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,mCAAmC,EAAhD,CAAgD,EAChE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsDate.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js new file mode 100644 index 0000000..c9eab88 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js @@ -0,0 +1,25 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_ENUM = "isEnum"; +/** + * Checks if a given value is an enum + */ +export function isEnum(value, entity) { + var enumValues = Object.keys(entity) + .map(function (k) { return entity[k]; }); + return enumValues.indexOf(value) >= 0; +} +/** + * Checks if a given value is an enum + */ +export function IsEnum(entity, validationOptions) { + return ValidateBy({ + name: IS_ENUM, + constraints: [entity], + validator: { + validate: function (value, args) { return isEnum(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a valid enum value"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsEnum.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js.map new file mode 100644 index 0000000..534ad0b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsEnum.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsEnum.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC;AAEhC;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAc,EAAE,MAAW;IAC9C,IAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;SACjC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,MAAM,CAAC,CAAC,CAAC,EAAT,CAAS,CAAC,CAAC;IACzB,OAAO,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,MAAc,EAAE,iBAAqC;IACxE,OAAO,UAAU,CACb;QACI,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC;YAC7D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,sCAAsC,EAAnD,CAAmD,EACnE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsEnum.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js new file mode 100644 index 0000000..8144a8a --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_INT = "isInt"; +/** + * Checks if value is an integer. + */ +export function isInt(val) { + return typeof val === "number" && Number.isInteger(val); +} +/** + * Checks if value is an integer. + */ +export function IsInt(validationOptions) { + return ValidateBy({ + name: IS_INT, + validator: { + validate: function (value, args) { return isInt(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an integer number"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsInt.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js.map new file mode 100644 index 0000000..be7db5b --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsInt.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsInt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,MAAM,GAAG,OAAO,CAAC;AAE9B;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY;IAC9B,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,iBAAqC;IACvD,OAAO,UAAU,CACb;QACI,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,EAAZ,CAAY;YACvC,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,qCAAqC,EAAlD,CAAkD,EAClE,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsInt.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js new file mode 100644 index 0000000..65230ad --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js @@ -0,0 +1,43 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_NUMBER = "isNumber"; +/** + * Checks if a given value is a number. + */ +export function isNumber(value, options) { + if (options === void 0) { options = {}; } + if (typeof value !== "number") { + return false; + } + if (value === Infinity || value === -Infinity) { + return options.allowInfinity; + } + if (Number.isNaN(value)) { + return options.allowNaN; + } + if (options.maxDecimalPlaces !== undefined) { + var decimalPlaces = 0; + if ((value % 1) !== 0) { + decimalPlaces = value.toString().split(".")[1].length; + } + if (decimalPlaces > options.maxDecimalPlaces) { + return false; + } + } + return Number.isFinite(value); +} +/** + * Checks if a value is a number. + */ +export function IsNumber(options, validationOptions) { + if (options === void 0) { options = {}; } + return ValidateBy({ + name: IS_NUMBER, + constraints: [options], + validator: { + validate: function (value, args) { return isNumber(value, args.constraints[0]); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a number conforming to the specified constraints"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsNumber.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js.map new file mode 100644 index 0000000..8cb68ee --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsNumber.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/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C,EAApC,CAAoC;YAC/D,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,oEAAoE,EAAjF,CAAiF,EACjG,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsNumber.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js new file mode 100644 index 0000000..ff82db1 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js @@ -0,0 +1,24 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_OBJECT = "isObject"; +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +export function isObject(value) { + return value != null && (typeof value === "object" || typeof value === "function") && !Array.isArray(value); +} +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +export function IsObject(validationOptions) { + return ValidateBy({ + name: IS_OBJECT, + validator: { + validate: function (value, args) { return isObject(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be an object"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsObject.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js.map new file mode 100644 index 0000000..b7d45c4 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsObject.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACnC,OAAO,KAAK,IAAI,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe;YAC1C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,6BAA6B,EAA1C,CAA0C,EAC1D,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsObject.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js b/src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js new file mode 100644 index 0000000..df8910c --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js @@ -0,0 +1,22 @@ +import { buildMessage, ValidateBy } from "../common/ValidateBy"; +export var IS_STRING = "isString"; +/** +* Checks if a given value is a real string. +*/ +export function isString(value) { + return value instanceof String || typeof value === "string"; +} +/** +* Checks if a given value is a real string. +*/ +export function IsString(validationOptions) { + return ValidateBy({ + name: IS_STRING, + validator: { + validate: function (value, args) { return isString(value); }, + defaultMessage: buildMessage(function (eachPrefix) { return eachPrefix + "$property must be a string"; }, validationOptions) + } + }, validationOptions); +} + +//# sourceMappingURL=IsString.js.map diff --git a/src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js.map b/src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js.map new file mode 100644 index 0000000..e922877 --- /dev/null +++ b/src/node_modules/class-validator/esm5/decorator/typechecker/IsString.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/decorator/typechecker/IsString.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,CAAC,IAAM,SAAS,GAAG,UAAU,CAAC;AAEpC;;EAEE;AACF,MAAM,UAAU,QAAQ,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,MAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AAC/D,CAAC;AAED;;EAEE;AACF,MAAM,UAAU,QAAQ,CAAC,iBAAqC;IAC1D,OAAO,UAAU,CACb;QACI,IAAI,EAAE,SAAS;QACf,SAAS,EAAE;YACP,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe;YAC1C,cAAc,EAAE,YAAY,CACxB,UAAC,UAAU,IAAK,OAAA,UAAU,GAAG,4BAA4B,EAAzC,CAAyC,EACzD,iBAAiB,CACpB;SACJ;KACJ,EACD,iBAAiB,CACpB,CAAC;AACN,CAAC","file":"IsString.js","sourcesContent":["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"],"sourceRoot":"../.."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/index.js b/src/node_modules/class-validator/esm5/index.js new file mode 100644 index 0000000..dceef7a --- /dev/null +++ b/src/node_modules/class-validator/esm5/index.js @@ -0,0 +1,57 @@ +import { getMetadataStorage } from "./metadata/MetadataStorage"; +import { Validator } from "./validation/Validator"; +import { getFromContainer } from "./container"; +// ------------------------------------------------------------------------- +// Export everything api users needs +// ------------------------------------------------------------------------- +export * from "./container"; +export * from "./decorator/decorators"; +export * from "./decorator/ValidationOptions"; +export * from "./validation/ValidationError"; +export * from "./validation/ValidationTypes"; +export * from "./validation/Validator"; +export * from "./register-decorator"; +export * from "./metadata/MetadataStorage"; +/** + * Validates given object by object's decorators or given validation schema. + */ +export function validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validate(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Validates given object by object's decorators or given validation schema and reject on error. + */ +export function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Validates given object by object's decorators or given validation schema. + * Note that this method completely ignores async validations. + * If you want to properly perform validation you need to call validate method instead. + */ +export function validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + if (typeof schemaNameOrObject === "string") { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); + } + else { + return getFromContainer(Validator).validateSync(schemaNameOrObject, objectOrValidationOptions); + } +} +/** + * Registers a new validation schema. + */ +export function registerSchema(schema) { + getMetadataStorage().addValidationSchema(schema); +} + +//# sourceMappingURL=index.js.map diff --git a/src/node_modules/class-validator/esm5/index.js.map b/src/node_modules/class-validator/esm5/index.js.map new file mode 100644 index 0000000..b4c2c74 --- /dev/null +++ b/src/node_modules/class-validator/esm5/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/index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AAwC;IACjE,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QACxC,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,kBAA4B,EAAE,yBAAmC,EAAE,qBAAqB,CAAC,CAAC;KAC7I;SAAM;QACH,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,kBAA4B,EAAE,yBAA6C,CAAC,CAAC;KAChI;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAwB;IACnD,kBAAkB,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACrD,CAAC","file":"index.js","sourcesContent":["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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js b/src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js new file mode 100644 index 0000000..167ed94 --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js @@ -0,0 +1,32 @@ +import { getFromContainer } from "../container"; +/** + * This metadata interface contains information for custom validators. + */ +var ConstraintMetadata = /** @class */ (function () { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + function ConstraintMetadata(target, name, async) { + if (async === void 0) { async = false; } + this.target = target; + this.name = name; + this.async = async; + } + Object.defineProperty(ConstraintMetadata.prototype, "instance", { + // ------------------------------------------------------------------------- + // Accessors + // ------------------------------------------------------------------------- + /** + * Instance of the target custom validation class which performs validation. + */ + get: function () { + return getFromContainer(this.target); + }, + enumerable: true, + configurable: true + }); + return ConstraintMetadata; +}()); +export { ConstraintMetadata }; + +//# sourceMappingURL=ConstraintMetadata.js.map diff --git a/src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js.map b/src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js.map new file mode 100644 index 0000000..d064b8d --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/ConstraintMetadata.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/metadata/ConstraintMetadata.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAE9C;;GAEG;AACH;IAqBI,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAE5E,4BAAY,MAAgB,EAAE,IAAa,EAAE,KAAsB;QAAtB,sBAAA,EAAA,aAAsB;QAC/D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IASD,sBAAI,wCAAQ;QAPZ,4EAA4E;QAC5E,YAAY;QACZ,4EAA4E;QAE5E;;WAEG;aACH;YACI,OAAO,gBAAgB,CAA+B,IAAI,CAAC,MAAM,CAAC,CAAC;QACvE,CAAC;;;OAAA;IAEL,yBAAC;AAAD,CA1CA,AA0CC,IAAA","file":"ConstraintMetadata.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/metadata/MetadataStorage.js b/src/node_modules/class-validator/esm5/metadata/MetadataStorage.js new file mode 100644 index 0000000..836f4fc --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/MetadataStorage.js @@ -0,0 +1,116 @@ +import { ValidationSchemaToMetadataTransformer } from "../validation-schema/ValidationSchemaToMetadataTransformer"; +/** + * Gets metadata storage. + * Metadata storage follows the best practices and stores metadata in a global variable. + */ +export function getMetadataStorage() { + if (typeof window !== "undefined") { + window.global = window; + } + if (!global.classValidatorMetadataStorage) + global.classValidatorMetadataStorage = new MetadataStorage(); + return global.classValidatorMetadataStorage; +} +/** + * Storage all metadatas. + */ +var MetadataStorage = /** @class */ (function () { + function MetadataStorage() { + // ------------------------------------------------------------------------- + // Private properties + // ------------------------------------------------------------------------- + this.validationMetadatas = []; + this.constraintMetadatas = []; + } + Object.defineProperty(MetadataStorage.prototype, "hasValidationMetaData", { + get: function () { + return !!this.validationMetadatas.length; + }, + enumerable: true, + configurable: true + }); + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + /** + * Adds a new validation metadata. + */ + MetadataStorage.prototype.addValidationSchema = function (schema) { + var _this = this; + var validationMetadatas = new ValidationSchemaToMetadataTransformer().transform(schema); + validationMetadatas.forEach(function (validationMetadata) { return _this.addValidationMetadata(validationMetadata); }); + }; + /** + * Adds a new validation metadata. + */ + MetadataStorage.prototype.addValidationMetadata = function (metadata) { + this.validationMetadatas.push(metadata); + }; + /** + * Adds a new constraint metadata. + */ + MetadataStorage.prototype.addConstraintMetadata = function (metadata) { + this.constraintMetadatas.push(metadata); + }; + /** + * Groups metadata by their property names. + */ + MetadataStorage.prototype.groupByPropertyName = function (metadata) { + var grouped = {}; + metadata.forEach(function (metadata) { + if (!grouped[metadata.propertyName]) + grouped[metadata.propertyName] = []; + grouped[metadata.propertyName].push(metadata); + }); + return grouped; + }; + /** + * Gets all validation metadatas for the given object with the given groups. + */ + MetadataStorage.prototype.getTargetValidationMetadatas = function (targetConstructor, targetSchema, groups) { + // get directly related to a target metadatas + var originalMetadatas = this.validationMetadatas.filter(function (metadata) { + if (metadata.target !== targetConstructor && metadata.target !== targetSchema) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(function (group) { return groups.indexOf(group) !== -1; }); + return true; + }); + // get metadatas for inherited classes + var inheritedMetadatas = this.validationMetadatas.filter(function (metadata) { + // if target is a string it's means we validate agains a schema, and there is no inheritance support for schemas + if (typeof metadata.target === "string") + return false; + if (metadata.target === targetConstructor) + return false; + if (metadata.target instanceof Function && + !(targetConstructor.prototype instanceof metadata.target)) + return false; + if (metadata.always) + return true; + if (groups && groups.length > 0) + return metadata.groups && !!metadata.groups.find(function (group) { return groups.indexOf(group) !== -1; }); + return true; + }); + // filter out duplicate metadatas, prefer original metadatas instead of inherited metadatas + var uniqueInheritedMetadatas = inheritedMetadatas.filter(function (inheritedMetadata) { + return !originalMetadatas.find(function (originalMetadata) { + return originalMetadata.propertyName === inheritedMetadata.propertyName && + originalMetadata.type === inheritedMetadata.type; + }); + }); + return originalMetadatas.concat(uniqueInheritedMetadatas); + }; + /** + * Gets all validator constraints for the given object. + */ + MetadataStorage.prototype.getTargetValidatorConstraints = function (target) { + return this.constraintMetadatas.filter(function (metadata) { return metadata.target === target; }); + }; + return MetadataStorage; +}()); +export { MetadataStorage }; + +//# sourceMappingURL=MetadataStorage.js.map diff --git a/src/node_modules/class-validator/esm5/metadata/MetadataStorage.js.map b/src/node_modules/class-validator/esm5/metadata/MetadataStorage.js.map new file mode 100644 index 0000000..79cb4f0 --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/MetadataStorage.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/metadata/MetadataStorage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qCAAqC,EAAC,MAAM,4DAA4D,CAAC;AAEjH;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAC9B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC9B,MAAc,CAAC,MAAM,GAAG,MAAM,CAAC;KACnC;IACD,IAAI,CAAE,MAAc,CAAC,6BAA6B;QAC7C,MAAc,CAAC,6BAA6B,GAAG,IAAI,eAAe,EAAE,CAAC;IAE1E,OAAQ,MAAc,CAAC,6BAA6B,CAAC;AACzD,CAAC;AAED;;GAEG;AACH;IAAA;QAEI,4EAA4E;QAC5E,qBAAqB;QACrB,4EAA4E;QAEpE,wBAAmB,GAAyB,EAAE,CAAC;QAC/C,wBAAmB,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CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,2FAA2F;QAC3F,IAAM,wBAAwB,GAAG,kBAAkB,CAAC,MAAM,CAAC,UAAA,iBAAiB;YACxE,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAA,gBAAgB;gBAC3C,OAAQ,gBAAgB,CAAC,YAAY,KAAK,iBAAiB,CAAC,YAAY;oBAChE,gBAAgB,CAAC,IAAI,KAAK,iBAAiB,CAAC,IAAI,CAAC;YAC7D,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,uDAA6B,GAA7B,UAA8B,MAAgB;QAC1C,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,MAAM,KAAK,MAAM,EAA1B,CAA0B,CAAC,CAAC;IACnF,CAAC;IAEL,sBAAC;AAAD,CAzGA,AAyGC,IAAA","file":"MetadataStorage.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js b/src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js new file mode 100644 index 0000000..c0d1ac5 --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js @@ -0,0 +1,43 @@ +/** + * This metadata contains validation rules. + */ +var ValidationMetadata = /** @class */ (function () { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + function ValidationMetadata(args) { + /** + * Validation groups used for this validation. + */ + this.groups = []; + /** + * Indicates if validation must be performed always, no matter of validation groups used. + */ + this.always = false; + /** + * Specifies if validated value is an array and each of its item must be validated. + */ + this.each = false; + /* + * A transient set of data passed through to the validation result for response mapping + */ + this.context = undefined; + this.type = args.type; + this.target = args.target; + this.propertyName = args.propertyName; + this.constraints = args.constraints; + this.constraintCls = args.constraintCls; + this.validationTypeOptions = args.validationTypeOptions; + if (args.validationOptions) { + this.message = args.validationOptions.message; + this.groups = args.validationOptions.groups; + this.always = args.validationOptions.always; + this.each = args.validationOptions.each; + this.context = args.validationOptions.context; + } + } + return ValidationMetadata; +}()); +export { ValidationMetadata }; + +//# sourceMappingURL=ValidationMetadata.js.map diff --git a/src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js.map b/src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js.map new file mode 100644 index 0000000..51c2176 --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/ValidationMetadata.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/metadata/ValidationMetadata.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH;IA6DI,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAE5E,4BAAY,IAA4B;QA7BxC;;WAEG;QACH,WAAM,GAAa,EAAE,CAAC;QAEtB;;WAEG;QACH,WAAM,GAAY,KAAK,CAAC;QAExB;;WAEG;QACH,SAAI,GAAY,KAAK,CAAC;QAEtB;;WAEG;QACH,YAAO,GAAS,SAAS,CAAC;QAYtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;QACxD,IAAI,IAAI,CAAC,iBAAiB,EAAE;YACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;YAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC;YAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;YACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC;SACjD;IACL,CAAC;IAEL,yBAAC;AAAD,CAjFA,AAiFC,IAAA","file":"ValidationMetadata.js","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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js b/src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js new file mode 100644 index 0000000..aa93419 --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidationMetadataArgs.js.map diff --git a/src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js.map b/src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js.map new file mode 100644 index 0000000..2803afc --- /dev/null +++ b/src/node_modules/class-validator/esm5/metadata/ValidationMetadataArgs.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/metadata/ValidationMetadataArgs.ts"],"names":[],"mappings":"","file":"ValidationMetadataArgs.js","sourcesContent":["import {ValidationOptions} from \"../decorator/ValidationOptions\";\n\n/**\n * Constructor arguments for ValidationMetadata class.\n */\nexport interface ValidationMetadataArgs {\n\n /**\n * Validation type.\n */\n type: string;\n\n /**\n * Object that is used to be validated.\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 options.\n */\n validationOptions?: ValidationOptions;\n\n /**\n * Extra options specific to validation type.\n */\n validationTypeOptions?: any;\n}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/register-decorator.js b/src/node_modules/class-validator/esm5/register-decorator.js new file mode 100644 index 0000000..5f14b2b --- /dev/null +++ b/src/node_modules/class-validator/esm5/register-decorator.js @@ -0,0 +1,47 @@ +import { ConstraintMetadata } from "./metadata/ConstraintMetadata"; +import { ValidationMetadata } from "./metadata/ValidationMetadata"; +import { ValidationTypes } from "./validation/ValidationTypes"; +import { getFromContainer } from "./container"; +import { MetadataStorage, getMetadataStorage } from "./metadata/MetadataStorage"; +/** + * Registers a custom validation decorator. + */ +export function registerDecorator(options) { + var constraintCls; + if (options.validator instanceof Function) { + constraintCls = options.validator; + var constraintClasses = getFromContainer(MetadataStorage).getTargetValidatorConstraints(options.validator); + if (constraintClasses.length > 1) { + throw "More than one implementation of ValidatorConstraintInterface found for validator on: " + options.target + ":" + options.propertyName; + } + } + else { + var validator_1 = options.validator; + constraintCls = /** @class */ (function () { + function CustomConstraint() { + } + CustomConstraint.prototype.validate = function (value, validationArguments) { + return validator_1.validate(value, validationArguments); + }; + CustomConstraint.prototype.defaultMessage = function (validationArguments) { + if (validator_1.defaultMessage) { + return validator_1.defaultMessage(validationArguments); + } + return ""; + }; + return CustomConstraint; + }()); + getMetadataStorage().addConstraintMetadata(new ConstraintMetadata(constraintCls, options.name, options.async)); + } + var validationMetadataArgs = { + type: options.name && ValidationTypes.isValid(options.name) ? options.name : ValidationTypes.CUSTOM_VALIDATION, + target: options.target, + propertyName: options.propertyName, + validationOptions: options.options, + constraintCls: constraintCls, + constraints: options.constraints + }; + getMetadataStorage().addValidationMetadata(new ValidationMetadata(validationMetadataArgs)); +} + +//# sourceMappingURL=register-decorator.js.map diff --git a/src/node_modules/class-validator/esm5/register-decorator.js.map b/src/node_modules/class-validator/esm5/register-decorator.js.map new file mode 100644 index 0000000..ba4c366 --- /dev/null +++ b/src/node_modules/class-validator/esm5/register-decorator.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/register-decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAyCjF;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAmC;IAEjE,IAAI,aAAuB,CAAC;IAC5B,IAAI,OAAO,CAAC,SAAS,YAAY,QAAQ,EAAE;QACvC,aAAa,GAAG,OAAO,CAAC,SAAqB,CAAC;QAC9C,IAAM,iBAAiB,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,6BAA6B,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC7G,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9B,MAAM,0FAAwF,OAAO,CAAC,MAAM,SAAI,OAAO,CAAC,YAAc,CAAC;SAC1I;KACJ;SAAM;QACH,IAAM,WAAS,GAAG,OAAO,CAAC,SAAyC,CAAC;QACpE,aAAa;YAAG;YAYhB,CAAC;YAXG,mCAAQ,GAAR,UAAS,KAAU,EAAE,mBAAyC;gBAC1D,OAAO,WAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;YAC1D,CAAC;YAED,yCAAc,GAAd,UAAe,mBAAyC;gBACpD,IAAI,WAAS,CAAC,cAAc,EAAE;oBAC1B,OAAO,WAAS,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;iBACxD;gBAED,OAAO,EAAE,CAAC;YACd,CAAC;YACL,uBAAC;QAAD,CAZgB,AAYf,GAAA,CAAC;QACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;KAClH;IAED,IAAM,sBAAsB,GAA2B;QACnD,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,iBAAiB;QAC9G,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,iBAAiB,EAAE,OAAO,CAAC,OAAO;QAClC,aAAa,EAAE,aAAa;QAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;KACnC,CAAC;IACF,kBAAkB,EAAE,CAAC,qBAAqB,CAAC,IAAI,kBAAkB,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAC/F,CAAC","file":"register-decorator.js","sourcesContent":["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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/utils.js b/src/node_modules/class-validator/esm5/utils.js new file mode 100644 index 0000000..e205866 --- /dev/null +++ b/src/node_modules/class-validator/esm5/utils.js @@ -0,0 +1,15 @@ +// https://github.com/TylorS/typed-is-promise/blob/abf1514e1b6961adfc75765476b0debb96b2c3ae/src/index.ts +export function isPromise(p) { + return p !== null && typeof p === "object" && typeof p.then === "function"; +} +/** + * Convert Map, Set to Array + */ +export function convertToArray(val) { + if (val instanceof Map) { + return Array.from(val.values()); + } + return Array.isArray(val) ? val : Array.from(val); +} + +//# sourceMappingURL=utils.js.map diff --git a/src/node_modules/class-validator/esm5/utils.js.map b/src/node_modules/class-validator/esm5/utils.js.map new file mode 100644 index 0000000..fc34ba7 --- /dev/null +++ b/src/node_modules/class-validator/esm5/utils.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,wGAAwG;AAExG,MAAM,UAAU,SAAS,CAAU,CAAM;IACrC,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAI,GAAoC;IAClE,IAAI,GAAG,YAAY,GAAG,EAAE;QACpB,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;KACnC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtD,CAAC","file":"utils.js","sourcesContent":["// 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"],"sourceRoot":"."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js new file mode 100644 index 0000000..60ea31c --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidationSchema.js.map diff --git a/src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js.map b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js.map new file mode 100644 index 0000000..94911ef --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchema.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation-schema/ValidationSchema.ts"],"names":[],"mappings":"","file":"ValidationSchema.js","sourcesContent":["/**\n * Validation schema is a decorator-free way of validation of your objects.\n * Also using validation schemas makes this library to be easily used with es6/es5.\n */\nexport interface ValidationSchema {\n\n /**\n * Schema name. This is required, because we tell validator to validate by this schema using its name.\n */\n name: string;\n\n /**\n * Validated properties.\n */\n properties: {\n\n /**\n * Name of the object's property to be validated which holds an array of validation constraints.\n */\n [propertyName: string]: {\n\n /**\n * Validation type. Should be one of the ValidationTypes value.\n */\n type: string;\n\n /**\n * Constraints set by validation type.\n */\n constraints?: any[];\n\n /**\n * Error message used to be used on validation fail.\n * You can use \"$value\" to use value that was failed by validation.\n * You can use \"$constraint1\" and \"$constraint2\" keys in the message string,\n * and they will be replaced with constraint values if they exist.\n * Message can be either string, either a function that returns a string.\n * Second option allows to use values and custom messages depend of them.\n */\n message?: string|((value?: any, constraint1?: any, constraint2?: any) => string);\n\n /**\n * Specifies if validated value is an array and each of its item must be validated.\n */\n each?: boolean;\n\n /**\n * Indicates if validation must be performed always, no matter of validation groups used.\n */\n always?: boolean;\n\n /**\n * Validation groups used for this validation.\n */\n groups?: string[];\n\n /**\n * Specific validation type options.\n */\n options?: any;\n }[];\n };\n}\n"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js new file mode 100644 index 0000000..327894b --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js @@ -0,0 +1,35 @@ +import { ValidationMetadata } from "../metadata/ValidationMetadata"; +/** + * Used to transform validation schemas to validation metadatas. + */ +var ValidationSchemaToMetadataTransformer = /** @class */ (function () { + function ValidationSchemaToMetadataTransformer() { + } + ValidationSchemaToMetadataTransformer.prototype.transform = function (schema) { + var metadatas = []; + Object.keys(schema.properties).forEach(function (property) { + schema.properties[property].forEach(function (validation) { + var validationOptions = { + message: validation.message, + groups: validation.groups, + always: validation.always, + each: validation.each + }; + var args = { + type: validation.type, + target: schema.name, + propertyName: property, + constraints: validation.constraints, + validationTypeOptions: validation.options, + validationOptions: validationOptions + }; + metadatas.push(new ValidationMetadata(args)); + }); + }); + return metadatas; + }; + return ValidationSchemaToMetadataTransformer; +}()); +export { ValidationSchemaToMetadataTransformer }; + +//# sourceMappingURL=ValidationSchemaToMetadataTransformer.js.map diff --git a/src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js.map b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js.map new file mode 100644 index 0000000..ddb4968 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation-schema/ValidationSchemaToMetadataTransformer.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation-schema/ValidationSchemaToMetadataTransformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAKlE;;GAEG;AACH;IAAA;IA0BA,CAAC;IAxBG,yDAAS,GAAT,UAAU,MAAwB;QAC9B,IAAM,SAAS,GAAyB,EAAE,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAA,QAAQ;YAC3C,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAA,UAAU;gBAC1C,IAAM,iBAAiB,GAAsB;oBACzC,OAAO,EAAE,UAAU,CAAC,OAAO;oBAC3B,MAAM,EAAE,UAAU,CAAC,MAAM;oBACzB,MAAM,EAAE,UAAU,CAAC,MAAM;oBACzB,IAAI,EAAE,UAAU,CAAC,IAAI;iBACxB,CAAC;gBACF,IAAM,IAAI,GAA2B;oBACjC,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,MAAM,EAAE,MAAM,CAAC,IAAI;oBACnB,YAAY,EAAE,QAAQ;oBACtB,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,qBAAqB,EAAE,UAAU,CAAC,OAAO;oBACzC,iBAAiB,EAAE,iBAAiB;iBACvC,CAAC;gBACF,SAAS,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACrB,CAAC;IAEL,4CAAC;AAAD,CA1BA,AA0BC,IAAA","file":"ValidationSchemaToMetadataTransformer.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/ValidationArguments.js b/src/node_modules/class-validator/esm5/validation/ValidationArguments.js new file mode 100644 index 0000000..4e35955 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationArguments.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidationArguments.js.map diff --git a/src/node_modules/class-validator/esm5/validation/ValidationArguments.js.map b/src/node_modules/class-validator/esm5/validation/ValidationArguments.js.map new file mode 100644 index 0000000..ffdbd2a --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationArguments.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationArguments.ts"],"names":[],"mappings":"","file":"ValidationArguments.js","sourcesContent":["/**\n * Arguments being sent to message builders - user can create message either by simply returning a string,\n * either by returning a function that accepts MessageArguments and returns a message string built based on these arguments.\n */\nexport interface ValidationArguments {\n\n /**\n * Validating value.\n */\n value: any;\n\n /**\n * Constraints set by this validation type.\n */\n constraints: any[];\n\n /**\n * Name of the target that is being validated.\n */\n targetName: string;\n\n /**\n * Object that is being validated.\n */\n object: Object;\n\n /**\n * Name of the object's property being validated.\n */\n property: string;\n \n}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/ValidationError.js b/src/node_modules/class-validator/esm5/validation/ValidationError.js new file mode 100644 index 0000000..78d230b --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationError.js @@ -0,0 +1,45 @@ +/** + * Validation error description. + */ +var ValidationError = /** @class */ (function () { + function ValidationError() { + } + /** + * + * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability + * @param hasParent true when the error is a child of an another one + * @param parentPath path as string to the parent of this property + */ + ValidationError.prototype.toString = function (shouldDecorate, hasParent, parentPath) { + var _this = this; + if (shouldDecorate === void 0) { shouldDecorate = false; } + if (hasParent === void 0) { hasParent = false; } + if (parentPath === void 0) { parentPath = ""; } + var boldStart = shouldDecorate ? "\u001B[1m" : ""; + var boldEnd = shouldDecorate ? "\u001B[22m" : ""; + var propConstraintFailed = function (propertyName) { return " - property " + boldStart + parentPath + propertyName + boldEnd + " has failed the following constraints: " + boldStart + Object.keys(_this.constraints).join(", ") + boldEnd + " \n"; }; + if (!hasParent) { + return "An instance of " + boldStart + (this.target ? this.target.constructor.name : "an object") + boldEnd + " has failed the validation:\n" + + (this.constraints ? propConstraintFailed(this.property) : "") + + this.children + .map(function (childError) { return childError.toString(shouldDecorate, true, _this.property); }) + .join(""); + } + else { + // we format numbers as array indexes for better readability. + var formattedProperty_1 = Number.isInteger(+this.property) ? "[" + this.property + "]" : "" + (parentPath ? "." : "") + this.property; + if (this.constraints) { + return propConstraintFailed(formattedProperty_1); + } + else { + return this.children + .map(function (childError) { return childError.toString(shouldDecorate, true, "" + parentPath + formattedProperty_1); }) + .join(""); + } + } + }; + return ValidationError; +}()); +export { ValidationError }; + +//# sourceMappingURL=ValidationError.js.map diff --git a/src/node_modules/class-validator/esm5/validation/ValidationError.js.map b/src/node_modules/class-validator/esm5/validation/ValidationError.js.map new file mode 100644 index 0000000..b72b050 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationError.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationError.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;IAAA;IAuEA,CAAC;IA9BG;;;;;OAKG;IACH,kCAAQ,GAAR,UAAS,cAA+B,EAAE,SAA0B,EAAE,UAAuB;QAA7F,iBAuBC;QAvBQ,+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IAAI,CAAC,QAAU,CAAC;YAE/H,IAAI,IAAI,CAAC,WAAW,EAAE;gBAClB,OAAO,oBAAoB,CAAC,mBAAiB,CAAC,CAAC;aAClD;iBAAM;gBACH,OAAO,IAAI,CAAC,QAAQ;qBACf,GAAG,CAAC,UAAA,UAAU,IAAI,OAAA,UAAU,CAAC,QAAQ,CAAC,cAAc,EAAE,IAAI,EAAE,KAAG,UAAU,GAAG,mBAAmB,CAAG,EAAhF,CAAgF,CAAC;qBACnG,IAAI,CAAC,EAAE,CAAC,CAAC;aACjB;SACJ;IACL,CAAC;IACL,sBAAC;AAAD,CAvEA,AAuEC,IAAA","file":"ValidationError.js","sourcesContent":["/**\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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/ValidationExecutor.js b/src/node_modules/class-validator/esm5/validation/ValidationExecutor.js new file mode 100644 index 0000000..efdc2ec --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationExecutor.js @@ -0,0 +1,326 @@ +import { ValidationError } from "./ValidationError"; +import { ValidationTypes } from "./ValidationTypes"; +import { ValidationUtils } from "./ValidationUtils"; +import { isPromise, convertToArray } from "../utils"; +import { getMetadataStorage } from "../metadata/MetadataStorage"; +/** + * Executes validation over given object. + */ +var ValidationExecutor = /** @class */ (function () { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + function ValidationExecutor(validator, validatorOptions) { + this.validator = validator; + this.validatorOptions = validatorOptions; + // ------------------------------------------------------------------------- + // Properties + // ------------------------------------------------------------------------- + this.awaitingPromises = []; + this.ignoreAsyncValidations = false; + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + this.metadataStorage = getMetadataStorage(); + } + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + ValidationExecutor.prototype.execute = function (object, targetSchema, validationErrors) { + var _this = this; + /** + * If there is no metadata registered it means possibly the dependencies are not flatterned and + * more than one instance is used. + * + * TODO: This needs proper handling, forcing to use the same container or some other proper solution. + */ + if (!this.metadataStorage.hasValidationMetaData) { + console.warn("No metadata found. There is more than once class-validator version installed probably. You need to flatten your dependencies."); + } + var groups = this.validatorOptions ? this.validatorOptions.groups : undefined; + var targetMetadatas = this.metadataStorage.getTargetValidationMetadatas(object.constructor, targetSchema, groups); + var groupedMetadatas = this.metadataStorage.groupByPropertyName(targetMetadatas); + if (this.validatorOptions && this.validatorOptions.forbidUnknownValues && !targetMetadatas.length) { + var validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + validationError.value = undefined; + validationError.property = undefined; + validationError.children = []; + validationError.constraints = { unknownValue: "an unknown value was passed to the validate function" }; + validationErrors.push(validationError); + return; + } + if (this.validatorOptions && this.validatorOptions.whitelist) + this.whitelist(object, groupedMetadatas, validationErrors); + // General validation + Object.keys(groupedMetadatas).forEach(function (propertyName) { + var value = object[propertyName]; + var definedMetadatas = groupedMetadatas[propertyName].filter(function (metadata) { return metadata.type === ValidationTypes.IS_DEFINED; }); + var metadatas = groupedMetadatas[propertyName].filter(function (metadata) { return metadata.type !== ValidationTypes.IS_DEFINED && metadata.type !== ValidationTypes.WHITELIST; }); + if (value instanceof Promise && metadatas.find(function (metadata) { return metadata.type === ValidationTypes.PROMISE_VALIDATION; })) { + _this.awaitingPromises.push(value.then(function (resolvedValue) { + _this.performValidations(object, resolvedValue, propertyName, definedMetadatas, metadatas, validationErrors); + })); + } + else { + _this.performValidations(object, value, propertyName, definedMetadatas, metadatas, validationErrors); + } + }); + }; + ValidationExecutor.prototype.whitelist = function (object, groupedMetadatas, validationErrors) { + var _this = this; + var notAllowedProperties = []; + Object.keys(object).forEach(function (propertyName) { + // does this property have no metadata? + if (!groupedMetadatas[propertyName] || groupedMetadatas[propertyName].length === 0) + notAllowedProperties.push(propertyName); + }); + if (notAllowedProperties.length > 0) { + if (this.validatorOptions && this.validatorOptions.forbidNonWhitelisted) { + // throw errors + notAllowedProperties.forEach(function (property) { + var _a; + var validationError = _this.generateValidationError(object, object[property], property); + validationError.constraints = (_a = {}, _a[ValidationTypes.WHITELIST] = "property " + property + " should not exist", _a); + validationError.children = undefined; + validationErrors.push(validationError); + }); + } + else { + // strip non allowed properties + notAllowedProperties.forEach(function (property) { return delete object[property]; }); + } + } + }; + ValidationExecutor.prototype.stripEmptyErrors = function (errors) { + var _this = this; + return errors.filter(function (error) { + if (error.children) { + error.children = _this.stripEmptyErrors(error.children); + } + if (Object.keys(error.constraints).length === 0) { + if (error.children.length === 0) { + return false; + } + else { + delete error.constraints; + } + } + return true; + }); + }; + // ------------------------------------------------------------------------- + // Private Methods + // ------------------------------------------------------------------------- + ValidationExecutor.prototype.performValidations = function (object, value, propertyName, definedMetadatas, metadatas, validationErrors) { + var customValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.CUSTOM_VALIDATION; }); + var nestedValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.NESTED_VALIDATION; }); + var conditionalValidationMetadatas = metadatas.filter(function (metadata) { return metadata.type === ValidationTypes.CONDITIONAL_VALIDATION; }); + var validationError = this.generateValidationError(object, value, propertyName); + validationErrors.push(validationError); + var canValidate = this.conditionalValidations(object, value, conditionalValidationMetadatas); + if (!canValidate) { + return; + } + // handle IS_DEFINED validation type the special way - it should work no matter skipUndefinedProperties/skipMissingProperties is set or not + this.customValidations(object, value, definedMetadatas, validationError); + this.mapContexts(object, value, definedMetadatas, validationError); + if (value === undefined && this.validatorOptions && this.validatorOptions.skipUndefinedProperties === true) { + return; + } + if (value === null && this.validatorOptions && this.validatorOptions.skipNullProperties === true) { + return; + } + if ((value === null || value === undefined) && this.validatorOptions && this.validatorOptions.skipMissingProperties === true) { + return; + } + this.customValidations(object, value, customValidationMetadatas, validationError); + this.nestedValidations(value, nestedValidationMetadatas, validationError.children); + this.mapContexts(object, value, metadatas, validationError); + this.mapContexts(object, value, customValidationMetadatas, validationError); + }; + ValidationExecutor.prototype.generateValidationError = function (object, value, propertyName) { + var validationError = new ValidationError(); + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.target === undefined || + this.validatorOptions.validationError.target === true) + validationError.target = object; + if (!this.validatorOptions || + !this.validatorOptions.validationError || + this.validatorOptions.validationError.value === undefined || + this.validatorOptions.validationError.value === true) + validationError.value = value; + validationError.property = propertyName; + validationError.children = []; + validationError.constraints = {}; + return validationError; + }; + ValidationExecutor.prototype.conditionalValidations = function (object, value, metadatas) { + return metadatas + .map(function (metadata) { return metadata.constraints[0](object, value); }) + .reduce(function (resultA, resultB) { return resultA && resultB; }, true); + }; + ValidationExecutor.prototype.customValidations = function (object, value, metadatas, error) { + var _this = this; + metadatas.forEach(function (metadata) { + _this.metadataStorage + .getTargetValidatorConstraints(metadata.constraintCls) + .forEach(function (customConstraintMetadata) { + if (customConstraintMetadata.async && _this.ignoreAsyncValidations) + return; + var validationArguments = { + targetName: object.constructor ? object.constructor.name : undefined, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + if (!metadata.each || !(value instanceof Array || value instanceof Set || value instanceof Map)) { + var validatedValue = customConstraintMetadata.instance.validate(value, validationArguments); + if (isPromise(validatedValue)) { + var promise = validatedValue.then(function (isValid) { + if (!isValid) { + var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1]; + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + _this.awaitingPromises.push(promise); + } + else { + if (!validatedValue) { + var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1]; + error.constraints[type] = message; + } + } + return; + } + // convert set and map into array + var arrayValue = convertToArray(value); + // Validation needs to be applied to each array item + var validatedSubValues = arrayValue.map(function (subValue) { return customConstraintMetadata.instance.validate(subValue, validationArguments); }); + var validationIsAsync = validatedSubValues + .some(function (validatedSubValue) { return isPromise(validatedSubValue); }); + if (validationIsAsync) { + // Wrap plain values (if any) in promises, so that all are async + var asyncValidatedSubValues = validatedSubValues + .map(function (validatedSubValue) { return isPromise(validatedSubValue) ? validatedSubValue : Promise.resolve(validatedSubValue); }); + var asyncValidationIsFinishedPromise = Promise.all(asyncValidatedSubValues) + .then(function (flatValidatedValues) { + var validationResult = flatValidatedValues.every(function (isValid) { return isValid; }); + if (!validationResult) { + var _a = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _a[0], message = _a[1]; + error.constraints[type] = message; + if (metadata.context) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + _this.awaitingPromises.push(asyncValidationIsFinishedPromise); + return; + } + var validationResult = validatedSubValues.every(function (isValid) { return isValid; }); + if (!validationResult) { + var _b = _this.createValidationError(object, value, metadata, customConstraintMetadata), type = _b[0], message = _b[1]; + error.constraints[type] = message; + } + }); + }); + }; + ValidationExecutor.prototype.nestedValidations = function (value, metadatas, errors) { + var _this = this; + if (value === void 0) { + return; + } + metadatas.forEach(function (metadata) { + var _a; + if (metadata.type !== ValidationTypes.NESTED_VALIDATION && + metadata.type !== ValidationTypes.PROMISE_VALIDATION) { + return; + } + if (value instanceof Array || value instanceof Set || value instanceof Map) { + // Treats Set as an array - as index of Set value is value itself and it is common case to have Object as value + var arrayLikeValue = value instanceof Set ? Array.from(value) : value; + arrayLikeValue.forEach(function (subValue, index) { + _this.performValidations(value, subValue, index.toString(), [], metadatas, errors); + }); + } + else if (value instanceof Object) { + var targetSchema = typeof metadata.target === "string" ? metadata.target : metadata.target.name; + _this.execute(value, targetSchema, errors); + } + else { + var error = new ValidationError(); + error.value = value; + error.property = metadata.propertyName; + error.target = metadata.target; + var _b = _this.createValidationError(metadata.target, value, metadata), type = _b[0], message = _b[1]; + error.constraints = (_a = {}, + _a[type] = message, + _a); + errors.push(error); + } + }); + }; + ValidationExecutor.prototype.mapContexts = function (object, value, metadatas, error) { + var _this = this; + return metadatas + .forEach(function (metadata) { + if (metadata.context) { + var customConstraint = void 0; + if (metadata.type === ValidationTypes.CUSTOM_VALIDATION) { + var customConstraints = _this.metadataStorage.getTargetValidatorConstraints(metadata.constraintCls); + customConstraint = customConstraints[0]; + } + var type = _this.getConstraintType(metadata, customConstraint); + if (error.constraints[type]) { + if (!error.contexts) { + error.contexts = {}; + } + error.contexts[type] = Object.assign((error.contexts[type] || {}), metadata.context); + } + } + }); + }; + ValidationExecutor.prototype.createValidationError = function (object, value, metadata, customValidatorMetadata) { + var targetName = object.constructor ? object.constructor.name : undefined; + var type = this.getConstraintType(metadata, customValidatorMetadata); + var validationArguments = { + targetName: targetName, + property: metadata.propertyName, + object: object, + value: value, + constraints: metadata.constraints + }; + var message = metadata.message || ""; + if (!metadata.message && + (!this.validatorOptions || (this.validatorOptions && !this.validatorOptions.dismissDefaultMessages))) { + if (customValidatorMetadata && customValidatorMetadata.instance.defaultMessage instanceof Function) { + message = customValidatorMetadata.instance.defaultMessage(validationArguments); + } + } + var messageString = ValidationUtils.replaceMessageSpecialTokens(message, validationArguments); + return [type, messageString]; + }; + ValidationExecutor.prototype.getConstraintType = function (metadata, customValidatorMetadata) { + var type = customValidatorMetadata && customValidatorMetadata.name ? customValidatorMetadata.name : metadata.type; + return type; + }; + return ValidationExecutor; +}()); +export { ValidationExecutor }; + +//# sourceMappingURL=ValidationExecutor.js.map diff --git a/src/node_modules/class-validator/esm5/validation/ValidationExecutor.js.map b/src/node_modules/class-validator/esm5/validation/ValidationExecutor.js.map new file mode 100644 index 0000000..968a8ab --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationExecutor.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationExecutor.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,SAAS,EAAE,cAAc,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,k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AAC,CAAC;QACvE,IAAM,mBAAmB,GAAwB;YAC7C,UAAU,EAAE,UAAU;YACtB,QAAQ,EAAE,QAAQ,CAAC,YAAY;YAC/B,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,QAAQ,CAAC,WAAW;SACpC,CAAC;QAEF,IAAI,OAAO,GAAG,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC;QACrC,IAAI,CAAC,QAAQ,CAAC,OAAO;YACjB,CAAC,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC,EAAE;YACtG,IAAI,uBAAuB,IAAI,uBAAuB,CAAC,QAAQ,CAAC,cAAc,YAAY,QAAQ,EAAE;gBAChG,OAAO,GAAG,uBAAuB,CAAC,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;aAClF;SACJ;QAED,IAAM,aAAa,GAAG,eAAe,CAAC,2BAA2B,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;QAChG,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACjC,CAAC;IAEO,8CAAiB,GAAzB,UAA0B,QAA4B,EAAE,uBAA4C;QAChG,IAAM,IAAI,GAAG,uBAAuB,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QACpH,OAAO,IAAI,CAAC;IAChB,CAAC;IAEL,yBAAC;AAAD,CAtYA,AAsYC,IAAA","file":"ValidationExecutor.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/ValidationTypes.js b/src/node_modules/class-validator/esm5/validation/ValidationTypes.js new file mode 100644 index 0000000..39e3111 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationTypes.js @@ -0,0 +1,27 @@ +/** + * Validation types. + */ +var ValidationTypes = /** @class */ (function () { + function ValidationTypes() { + } + /** + * Checks if validation type is valid. + */ + ValidationTypes.isValid = function (type) { + var _this = this; + return type !== "isValid" && + type !== "getMessage" && + Object.keys(this).map(function (key) { return _this[key]; }).indexOf(type) !== -1; + }; + /* system */ + ValidationTypes.CUSTOM_VALIDATION = "customValidation"; // done + ValidationTypes.NESTED_VALIDATION = "nestedValidation"; // done + ValidationTypes.PROMISE_VALIDATION = "promiseValidation"; // done + ValidationTypes.CONDITIONAL_VALIDATION = "conditionalValidation"; // done + ValidationTypes.WHITELIST = "whitelistValidation"; // done + ValidationTypes.IS_DEFINED = "isDefined"; // done + return ValidationTypes; +}()); +export { ValidationTypes }; + +//# sourceMappingURL=ValidationTypes.js.map diff --git a/src/node_modules/class-validator/esm5/validation/ValidationTypes.js.map b/src/node_modules/class-validator/esm5/validation/ValidationTypes.js.map new file mode 100644 index 0000000..b5f9e87 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationTypes.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;IAAA;IAmBA,CAAC;IATG;;OAEG;IACI,uBAAO,GAAd,UAAe,IAAY;QAA3B,iBAIC;QAHG,OAAO,IAAI,KAAK,SAAS;YACrB,IAAI,KAAK,YAAY;YACrB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAC,KAAY,CAAC,GAAG,CAAC,EAAlB,CAAkB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9E,CAAC;IAfD,YAAY;IACL,iCAAiB,GAAG,kBAAkB,CAAC,CAAC,OAAO;IAC/C,iCAAiB,GAAG,kBAAkB,CAAC,CAAC,OAAO;IAC/C,kCAAkB,GAAG,mBAAmB,CAAC,CAAC,OAAO;IACjD,sCAAsB,GAAG,uBAAuB,CAAC,CAAC,OAAO;IACzD,yBAAS,GAAG,qBAAqB,CAAC,CAAC,OAAO;IAC1C,0BAAU,GAAG,WAAW,CAAC,CAAC,OAAO;IAW5C,sBAAC;CAnBD,AAmBC,IAAA;SAnBY,eAAe","file":"ValidationTypes.js","sourcesContent":["/**\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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/ValidationUtils.js b/src/node_modules/class-validator/esm5/validation/ValidationUtils.js new file mode 100644 index 0000000..801f872 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationUtils.js @@ -0,0 +1,29 @@ +var ValidationUtils = /** @class */ (function () { + function ValidationUtils() { + } + ValidationUtils.replaceMessageSpecialTokens = function (message, validationArguments) { + var messageString; + if (message instanceof Function) { + messageString = message(validationArguments); + } + else if (typeof message === "string") { + messageString = message; + } + if (messageString && validationArguments.constraints instanceof Array) { + validationArguments.constraints.forEach(function (constraint, index) { + messageString = messageString.replace(new RegExp("\\$constraint" + (index + 1), "g"), constraint); + }); + } + if (messageString && validationArguments.value !== undefined && validationArguments.value !== null && typeof validationArguments.value === "string") + messageString = messageString.replace(/\$value/g, validationArguments.value); + if (messageString) + messageString = messageString.replace(/\$property/g, validationArguments.property); + if (messageString) + messageString = messageString.replace(/\$target/g, validationArguments.targetName); + return messageString; + }; + return ValidationUtils; +}()); +export { ValidationUtils }; + +//# sourceMappingURL=ValidationUtils.js.map diff --git a/src/node_modules/class-validator/esm5/validation/ValidationUtils.js.map b/src/node_modules/class-validator/esm5/validation/ValidationUtils.js.map new file mode 100644 index 0000000..e801f45 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidationUtils.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidationUtils.ts"],"names":[],"mappings":"AAEA;IAAA;IA6BA,CAAC;IA3BU,2CAA2B,GAAlC,UAAmC,OAAuD,EAC9D,mBAAwC;QAEhE,IAAI,aAAqB,CAAC;QAC1B,IAAI,OAAO,YAAY,QAAQ,EAAE;YAC7B,aAAa,GAAI,OAAiD,CAAC,mBAAmB,CAAC,CAAC;SAE3F;aAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YACpC,aAAa,GAAG,OAAiB,CAAC;SACrC;QAED,IAAI,aAAa,IAAI,mBAAmB,CAAC,WAAW,YAAY,KAAK,EAAE;YACnE,mBAAmB,CAAC,WAAW,CAAC,OAAO,CAAC,UAAC,UAAU,EAAE,KAAK;gBACtD,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,mBAAgB,KAAK,GAAG,CAAC,CAAE,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;YACpG,CAAC,CAAC,CAAC;SACN;QAED,IAAI,aAAa,IAAI,mBAAmB,CAAC,KAAK,KAAK,SAAS,IAAI,mBAAmB,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,mBAAmB,CAAC,KAAK,KAAK,QAAQ;YAC/I,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,UAAU,EAAE,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACjF,IAAI,aAAa;YACb,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,aAAa,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACvF,IAAI,aAAa;YACb,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;QAEvF,OAAO,aAAa,CAAC;IACzB,CAAC;IAEL,sBAAC;AAAD,CA7BA,AA6BC,IAAA","file":"ValidationUtils.js","sourcesContent":["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}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/Validator.js b/src/node_modules/class-validator/esm5/validation/Validator.js new file mode 100644 index 0000000..3b430ed --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/Validator.js @@ -0,0 +1,68 @@ +import * as tslib_1 from "tslib"; +import { ValidationExecutor } from "./ValidationExecutor"; +/** + * Validator performs validation of the given object based on its metadata. + */ +var Validator = /** @class */ (function () { + function Validator() { + } + // ------------------------------------------------------------------------- + // Private Properties + // ------------------------------------------------------------------------- + /** + * Performs validation of the given object based on decorators or validation schema. + * Common method for `validateOrReject` and `validate` methods. + */ + Validator.prototype.coreValidate = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + var object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + var options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + var schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + var executor = new ValidationExecutor(this, options); + var validationErrors = []; + executor.execute(object, schema, validationErrors); + return Promise.all(executor.awaitingPromises).then(function () { + return executor.stripEmptyErrors(validationErrors); + }); + }; + /** + * Performs validation of the given object based on decorators or validation schema. + */ + Validator.prototype.validate = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + return this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions); + }; + /** + * Performs validation of the given object based on decorators or validation schema and reject on error. + */ + Validator.prototype.validateOrReject = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var errors; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.coreValidate(objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions)]; + case 1: + errors = _a.sent(); + if (errors.length) + return [2 /*return*/, Promise.reject(errors)]; + return [2 /*return*/]; + } + }); + }); + }; + /** + * Performs validation of the given object based on decorators or validation schema. + */ + Validator.prototype.validateSync = function (objectOrSchemaName, objectOrValidationOptions, maybeValidatorOptions) { + var object = typeof objectOrSchemaName === "string" ? objectOrValidationOptions : objectOrSchemaName; + var options = typeof objectOrSchemaName === "string" ? maybeValidatorOptions : objectOrValidationOptions; + var schema = typeof objectOrSchemaName === "string" ? objectOrSchemaName : undefined; + var executor = new ValidationExecutor(this, options); + executor.ignoreAsyncValidations = true; + var validationErrors = []; + executor.execute(object, schema, validationErrors); + return executor.stripEmptyErrors(validationErrors); + }; + return Validator; +}()); +export { Validator }; + +//# sourceMappingURL=Validator.js.map diff --git a/src/node_modules/class-validator/esm5/validation/Validator.js.map b/src/node_modules/class-validator/esm5/validation/Validator.js.map new file mode 100644 index 0000000..056f42c --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/Validator.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/Validator.ts"],"names":[],"mappings":";AAIA,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAIxD;;GAEG;AACH;IAAA;IA2FA,CAAC;IAzFG,4EAA4E;IAC5E,qBAAqB;IACrB,4EAA4E;IAG5E;;;OAGG;IACK,gCAAY,GAApB,UAAqB,kBAAiC,EAAE,yBAAmD,EAAE,qBAAwC;QACjJ,IAAM,MAAM,GAAG,OAAO,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,yBAAmC,CAAC,CAAC,CAAC,kBAA4B,CAAC;QAC3H,IAAM,OAAO,GAAG,OAAO,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,yBAA8C,CAAC;QAChI,IAAM,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C,CAAC;QAChI,IAAM,MAAM,GAAG,OAAO,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,kBAA4B,CAAC,CAAC,CAAC,SAAS,CAAC;QAEjG,IAAM,QAAQ,GAAG,IAAI,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACvD,QAAQ,CAAC,sBAAsB,GAAG,IAAI,CAAC;QACvC,IAAM,gBAAgB,GAAsB,EAAE,CAAC;QAC/C,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;QACnD,OAAO,QAAQ,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACvD,CAAC;IAEL,gBAAC;AAAD,CA3FA,AA2FC,IAAA","file":"Validator.js","sourcesContent":["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"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js b/src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js new file mode 100644 index 0000000..958d561 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidatorConstraintInterface.js.map diff --git a/src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js.map b/src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js.map new file mode 100644 index 0000000..1eff3c4 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidatorConstraintInterface.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidatorConstraintInterface.ts"],"names":[],"mappings":"","file":"ValidatorConstraintInterface.js","sourcesContent":["import {ValidationArguments} from \"./ValidationArguments\";\n/**\n * Custom validators must implement this interface to provide custom validation logic.\n */\nexport interface ValidatorConstraintInterface {\n\n /**\n * Method to be called to perform custom validation over given value.\n */\n validate(value: any, validationArguments?: ValidationArguments): Promise|boolean;\n\n /**\n * Gets default message when validation for this constraint fail.\n */\n defaultMessage?(validationArguments?: ValidationArguments): string;\n\n}"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/esm5/validation/ValidatorOptions.js b/src/node_modules/class-validator/esm5/validation/ValidatorOptions.js new file mode 100644 index 0000000..b0f3fb5 --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidatorOptions.js @@ -0,0 +1,3 @@ + + +//# sourceMappingURL=ValidatorOptions.js.map diff --git a/src/node_modules/class-validator/esm5/validation/ValidatorOptions.js.map b/src/node_modules/class-validator/esm5/validation/ValidatorOptions.js.map new file mode 100644 index 0000000..a68566b --- /dev/null +++ b/src/node_modules/class-validator/esm5/validation/ValidatorOptions.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../src/validation/ValidatorOptions.ts"],"names":[],"mappings":"","file":"ValidatorOptions.js","sourcesContent":["/**\n * Options passed to validator during validation.\n */\nexport interface ValidatorOptions {\n /**\n * If set to true then validator will skip validation of all properties that are undefined in the validating object.\n */\n skipUndefinedProperties?: boolean;\n\n /**\n * If set to true then validator will skip validation of all properties that are null in the validating object.\n */\n skipNullProperties?: boolean;\n\n /**\n * If set to true then validator will skip validation of all properties that are null or undefined in the validating object.\n */\n skipMissingProperties?: boolean;\n\n /**\n * If set to true validator will strip validated object of any properties that do not have any decorators.\n *\n * Tip: if no other decorator is suitable for your property use @Allow decorator.\n */\n whitelist?: boolean;\n\n /**\n * If set to true, instead of stripping non-whitelisted properties validator will throw an error\n */\n forbidNonWhitelisted?: boolean;\n\n /**\n * Groups to be used during validation of the object.\n */\n groups?: string[];\n\n /**\n * If set to true, the validation will not use default messages.\n * Error message always will be undefined if its not explicitly set.\n */\n dismissDefaultMessages?: boolean;\n\n /**\n * ValidationError special options.\n */\n validationError?: {\n\n /**\n * Indicates if target should be exposed in ValidationError.\n */\n target?: boolean;\n\n /**\n * Indicates if validated value should be exposed in ValidationError.\n */\n value?: boolean;\n\n };\n\n /**\n * Settings true will cause fail validation of unknown objects.\n */\n forbidUnknownValues?: boolean;\n\n}\n"],"sourceRoot":".."} \ No newline at end of file diff --git a/src/node_modules/class-validator/package.json b/src/node_modules/class-validator/package.json new file mode 100644 index 0000000..2272517 --- /dev/null +++ b/src/node_modules/class-validator/package.json @@ -0,0 +1,91 @@ +{ + "name": "class-validator", + "private": false, + "version": "0.12.2", + "description": "Class-based validation with Typescript / ES6 / ES5 using decorators or validation schemas. Supports both node.js and browser", + "license": "MIT", + "readmeFilename": "README.md", + "main": "./bundles/index.umd.js", + "module": "./esm5/index.js", + "es2015": "./esm2015/index.js", + "typings": "./types/index.d.ts", + "sideEffects": false, + "author": { + "name": "Umed Khudoiberdiev", + "email": "pleerock.me@gmail.com" + }, + "repository": { + "type": "git", + "url": "https://github.com/typestack/class-validator.git" + }, + "bugs": { + "url": "https://github.com/typestack/class-validator/issues" + }, + "tags": [ + "validator", + "validation", + "typescript", + "typescript-validator" + ], + "dependencies": { + "@types/validator": "13.0.0", + "google-libphonenumber": "^3.2.8", + "tslib": ">=1.9.0", + "validator": "13.0.0" + }, + "devDependencies": { + "@types/chai": "^4.2.0", + "@types/chai-as-promised": "^7.1.2", + "@types/del": "^4.0.0", + "@types/gulp": "^4.0.2", + "@types/gulp-istanbul": "^0.9.32", + "@types/gulp-mocha": "0.0.32", + "@types/gulp-replace": "0.0.31", + "@types/gulp-sourcemaps": "0.0.32", + "@types/mocha": "^7.0.0", + "@types/node": "^12.7.1", + "@types/rollup-plugin-json": "^3.0.2", + "@types/rollup-plugin-sourcemaps": "^0.4.2", + "@types/sinon": "^7.0.13", + "chai": "^4.2.0", + "chai-as-promised": "^7.1.1", + "codecov": "^3.0.4", + "conventional-changelog-angular": "^5.0.3", + "conventional-changelog-cli": "^2.0.21", + "del": "^5.0.0", + "es6-shim": "^0.35.3", + "gulp": "^4.0.2", + "gulp-conventional-changelog": "^2.0.19", + "gulp-istanbul": "^1.1.3", + "gulp-mocha": "^7.0.1", + "gulp-replace": "^1.0.0", + "gulp-shell": "^0.8.0", + "gulp-sourcemaps": "^2.6.4", + "gulp-tslint": "^8.1.3", + "gulp-typescript": "^5.0.1", + "gulpclass": "^0.2.0", + "mocha": "^7.0.1", + "remap-istanbul": "^0.13.0", + "rollup": "^1.20.1", + "rollup-plugin-commonjs": "^10.0.2", + "rollup-plugin-json": "^4.0.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-replace": "^2.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.3.0", + "rollup-plugin-uglify": "^6.0.4", + "sinon": "^8.0.0", + "sinon-chai": "^3.2.0", + "ts-node": "^8.8.1", + "tslib": "^1.11.1", + "tslint": "^5.11.0", + "tslint-stylish": "^2.1.0", + "typescript": "^3.5.3", + "webpack-config-utils": "^2.3.1" + }, + "scripts": { + "build": "gulp package", + "test": "gulp tests", + "changelog": "gulp changelog" + } +} diff --git a/src/node_modules/class-validator/types/container.d.ts b/src/node_modules/class-validator/types/container.d.ts new file mode 100644 index 0000000..ef40864 --- /dev/null +++ b/src/node_modules/class-validator/types/container.d.ts @@ -0,0 +1,25 @@ +/** + * Container options. + */ +export interface UseContainerOptions { + /** + * If set to true, then default container will be used in the case if given container haven't returned anything. + */ + fallback?: boolean; + /** + * If set to true, then default container will be used in the case if given container thrown an exception. + */ + fallbackOnErrors?: boolean; +} +/** + * Sets container to be used by this library. + */ +export declare function useContainer(iocContainer: { + get(someClass: any): any; +}, options?: UseContainerOptions): void; +/** + * Gets the IOC container used by this library. + */ +export declare function getFromContainer(someClass: { + new (...args: any[]): T; +} | Function): T; diff --git a/src/node_modules/class-validator/types/decorator/ValidationOptions.d.ts b/src/node_modules/class-validator/types/decorator/ValidationOptions.d.ts new file mode 100644 index 0000000..fe3f791 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/ValidationOptions.d.ts @@ -0,0 +1,25 @@ +import { ValidationArguments } from "../validation/ValidationArguments"; +/** + * Options used to pass to validation decorators. + */ +export interface ValidationOptions { + /** + * Specifies if validated value is an array and each of its items must be validated. + */ + each?: boolean; + /** + * Error message to be used on validation fail. + * Message can be either string or a function that returns a string. + */ + message?: string | ((validationArguments: ValidationArguments) => string); + /** + * Validation groups used for this validation. + */ + groups?: string[]; + /** + * Indicates if validation must be performed always, no matter of validation groups used. + */ + always?: boolean; + context?: any; +} +export declare function isValidationOptions(val: any): val is ValidationOptions; diff --git a/src/node_modules/class-validator/types/decorator/array/ArrayContains.d.ts b/src/node_modules/class-validator/types/decorator/array/ArrayContains.d.ts new file mode 100644 index 0000000..27aac50 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/array/ArrayContains.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const ARRAY_CONTAINS = "arrayContains"; +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +export declare function arrayContains(array: unknown, values: any[]): boolean; +/** + * Checks if array contains all values from the given array of values. + * If null or undefined is given then this function returns false. + */ +export declare function ArrayContains(values: any[], validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/array/ArrayMaxSize.d.ts b/src/node_modules/class-validator/types/decorator/array/ArrayMaxSize.d.ts new file mode 100644 index 0000000..bef710f --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/array/ArrayMaxSize.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const ARRAY_MAX_SIZE = "arrayMaxSize"; +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +export declare function arrayMaxSize(array: unknown, max: number): boolean; +/** + * Checks if array's length is as maximal this number. + * If null or undefined is given then this function returns false. + */ +export declare function ArrayMaxSize(max: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/array/ArrayMinSize.d.ts b/src/node_modules/class-validator/types/decorator/array/ArrayMinSize.d.ts new file mode 100644 index 0000000..f443583 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/array/ArrayMinSize.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const ARRAY_MIN_SIZE = "arrayMinSize"; +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +export declare function arrayMinSize(array: unknown, min: number): boolean; +/** + * Checks if array's length is as minimal this number. + * If null or undefined is given then this function returns false. + */ +export declare function ArrayMinSize(min: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/array/ArrayNotContains.d.ts b/src/node_modules/class-validator/types/decorator/array/ArrayNotContains.d.ts new file mode 100644 index 0000000..cc53cc4 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/array/ArrayNotContains.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const ARRAY_NOT_CONTAINS = "arrayNotContains"; +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +export declare function arrayNotContains(array: unknown, values: any[]): boolean; +/** + * Checks if array does not contain any of the given values. + * If null or undefined is given then this function returns false. + */ +export declare function ArrayNotContains(values: any[], validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/array/ArrayNotEmpty.d.ts b/src/node_modules/class-validator/types/decorator/array/ArrayNotEmpty.d.ts new file mode 100644 index 0000000..ac93af5 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/array/ArrayNotEmpty.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const ARRAY_NOT_EMPTY = "arrayNotEmpty"; +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +export declare function arrayNotEmpty(array: unknown): boolean; +/** + * Checks if given array is not empty. + * If null or undefined is given then this function returns false. + */ +export declare function ArrayNotEmpty(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/array/ArrayUnique.d.ts b/src/node_modules/class-validator/types/decorator/array/ArrayUnique.d.ts new file mode 100644 index 0000000..9e49747 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/array/ArrayUnique.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const ARRAY_UNIQUE = "arrayUnique"; +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +export declare function arrayUnique(array: unknown): boolean; +/** + * Checks if all array's values are unique. Comparison for objects is reference-based. + * If null or undefined is given then this function returns false. + */ +export declare function ArrayUnique(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/Allow.d.ts b/src/node_modules/class-validator/types/decorator/common/Allow.d.ts new file mode 100644 index 0000000..b2029ac --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/Allow.d.ts @@ -0,0 +1,5 @@ +import { ValidationOptions } from "../ValidationOptions"; +/** + * If object has both allowed and not allowed properties a validation error will be thrown. + */ +export declare function Allow(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/Equals.d.ts b/src/node_modules/class-validator/types/decorator/common/Equals.d.ts new file mode 100644 index 0000000..41bc43f --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/Equals.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const EQUALS = "equals"; +/** + * Checks if value matches ("===") the comparison. + */ +export declare function equals(value: unknown, comparison: unknown): boolean; +/** + * Checks if value matches ("===") the comparison. + */ +export declare function Equals(comparison: any, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsDefined.d.ts b/src/node_modules/class-validator/types/decorator/common/IsDefined.d.ts new file mode 100644 index 0000000..fa590d8 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsDefined.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_DEFINED: string; +/** + * Checks if value is defined (!== undefined, !== null). + */ +export declare function isDefined(value: any): boolean; +/** + * Checks if value is defined (!== undefined, !== null). + */ +export declare function IsDefined(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsEmpty.d.ts b/src/node_modules/class-validator/types/decorator/common/IsEmpty.d.ts new file mode 100644 index 0000000..74497d3 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsEmpty.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_EMPTY = "isEmpty"; +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +export declare function isEmpty(value: unknown): boolean; +/** + * Checks if given value is empty (=== '', === null, === undefined). + */ +export declare function IsEmpty(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsIn.d.ts b/src/node_modules/class-validator/types/decorator/common/IsIn.d.ts new file mode 100644 index 0000000..2df97ff --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsIn.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_IN = "isIn"; +/** + * Checks if given value is in a array of allowed values. + */ +export declare function isIn(value: unknown, possibleValues: unknown[]): boolean; +/** + * Checks if given value is in a array of allowed values. + */ +export declare function IsIn(values: any[], validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsLatLong.d.ts b/src/node_modules/class-validator/types/decorator/common/IsLatLong.d.ts new file mode 100644 index 0000000..1bc20bc --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsLatLong.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_LATLONG = "isLatLong"; +/** + * Checks if a value is string in format a "latitude,longitude". + */ +export declare function isLatLong(value: string): boolean; +/** + * Checks if a value is string in format a "latitude,longitude". + */ +export declare function IsLatLong(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsLatitude.d.ts b/src/node_modules/class-validator/types/decorator/common/IsLatitude.d.ts new file mode 100644 index 0000000..f7ccb77 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsLatitude.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_LATITUDE = "isLatitude"; +/** + * Checks if a given value is a latitude. + */ +export declare function isLatitude(value: string): boolean; +/** + * Checks if a given value is a latitude. + */ +export declare function IsLatitude(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsLongitude.d.ts b/src/node_modules/class-validator/types/decorator/common/IsLongitude.d.ts new file mode 100644 index 0000000..2e671ce --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsLongitude.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_LONGITUDE = "isLongitude"; +/** + * Checks if a given value is a longitude. + */ +export declare function isLongitude(value: string): boolean; +/** + * Checks if a given value is a longitude. + */ +export declare function IsLongitude(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsNotEmpty.d.ts b/src/node_modules/class-validator/types/decorator/common/IsNotEmpty.d.ts new file mode 100644 index 0000000..0025a67 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsNotEmpty.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_NOT_EMPTY = "isNotEmpty"; +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +export declare function isNotEmpty(value: unknown): boolean; +/** + * Checks if given value is not empty (!== '', !== null, !== undefined). + */ +export declare function IsNotEmpty(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsNotIn.d.ts b/src/node_modules/class-validator/types/decorator/common/IsNotIn.d.ts new file mode 100644 index 0000000..b99518a --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsNotIn.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_NOT_IN = "isNotIn"; +/** + * Checks if given value not in a array of allowed values. + */ +export declare function isNotIn(value: unknown, possibleValues: unknown[]): boolean; +/** + * Checks if given value not in a array of allowed values. + */ +export declare function IsNotIn(values: any[], validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/IsOptional.d.ts b/src/node_modules/class-validator/types/decorator/common/IsOptional.d.ts new file mode 100644 index 0000000..d7002f6 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/IsOptional.d.ts @@ -0,0 +1,5 @@ +import { ValidationOptions } from "../ValidationOptions"; +/** + * Checks if value is missing and if so, ignores all validators. + */ +export declare function IsOptional(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/NotEquals.d.ts b/src/node_modules/class-validator/types/decorator/common/NotEquals.d.ts new file mode 100644 index 0000000..6499a7a --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/NotEquals.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const NOT_EQUALS = "notEquals"; +/** + * Checks if value does not match ("!==") the comparison. + */ +export declare function notEquals(value: unknown, comparison: unknown): boolean; +/** + * Checks if value does not match ("!==") the comparison. + */ +export declare function NotEquals(comparison: any, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/Validate.d.ts b/src/node_modules/class-validator/types/decorator/common/Validate.d.ts new file mode 100644 index 0000000..508677b --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/Validate.d.ts @@ -0,0 +1,14 @@ +import { ValidationOptions } from "../ValidationOptions"; +/** + * Registers custom validator class. + */ +export declare function ValidatorConstraint(options?: { + name?: string; + async?: boolean; +}): (target: Function) => void; +/** + * Performs validation based on the given custom validation class. + * Validation class must be decorated with ValidatorConstraint decorator. + */ +export declare function Validate(constraintClass: Function, validationOptions?: ValidationOptions): PropertyDecorator; +export declare function Validate(constraintClass: Function, constraints?: any[], validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/ValidateBy.d.ts b/src/node_modules/class-validator/types/decorator/common/ValidateBy.d.ts new file mode 100644 index 0000000..0749c45 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/ValidateBy.d.ts @@ -0,0 +1,11 @@ +import { ValidationOptions } from "../ValidationOptions"; +import { ValidationArguments } from "../../validation/ValidationArguments"; +import { ValidatorConstraintInterface } from "../../validation/ValidatorConstraintInterface"; +export interface ValidateByOptions { + name: string; + constraints?: any[]; + validator: ValidatorConstraintInterface | Function; + async?: boolean; +} +export declare function buildMessage(impl: (eachPrefix: string, args?: ValidationArguments) => string, validationOptions?: ValidationOptions): (validationArguments?: ValidationArguments) => string; +export declare function ValidateBy(options: ValidateByOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/ValidateIf.d.ts b/src/node_modules/class-validator/types/decorator/common/ValidateIf.d.ts new file mode 100644 index 0000000..f9da2e1 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/ValidateIf.d.ts @@ -0,0 +1,5 @@ +import { ValidationOptions } from "../ValidationOptions"; +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +export declare function ValidateIf(condition: (object: any, value: any) => boolean, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/ValidateNested.d.ts b/src/node_modules/class-validator/types/decorator/common/ValidateNested.d.ts new file mode 100644 index 0000000..95be8b0 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/ValidateNested.d.ts @@ -0,0 +1,5 @@ +import { ValidationOptions } from "../ValidationOptions"; +/** + * Objects / object arrays marked with this decorator will also be validated. + */ +export declare function ValidateNested(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/common/ValidatePromise.d.ts b/src/node_modules/class-validator/types/decorator/common/ValidatePromise.d.ts new file mode 100644 index 0000000..e7d639b --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/common/ValidatePromise.d.ts @@ -0,0 +1,5 @@ +import { ValidationOptions } from "../ValidationOptions"; +/** + * Resolve promise before validation + */ +export declare function ValidatePromise(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/date/MaxDate.d.ts b/src/node_modules/class-validator/types/decorator/date/MaxDate.d.ts new file mode 100644 index 0000000..9e22451 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/date/MaxDate.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const MAX_DATE = "maxDate"; +/** +* Checks if the value is a date that's before the specified date. +*/ +export declare function maxDate(date: unknown, maxDate: Date): boolean; +/** + * Checks if the value is a date that's after the specified date. + */ +export declare function MaxDate(date: Date, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/date/MinDate.d.ts b/src/node_modules/class-validator/types/decorator/date/MinDate.d.ts new file mode 100644 index 0000000..a417321 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/date/MinDate.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const MIN_DATE = "minDate"; +/** + * Checks if the value is a date that's after the specified date. + */ +export declare function minDate(date: unknown, minDate: Date): boolean; +/** + * Checks if the value is a date that's after the specified date. + */ +export declare function MinDate(date: Date, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/decorators.d.ts b/src/node_modules/class-validator/types/decorator/decorators.d.ts new file mode 100644 index 0000000..ec7abde --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/decorators.d.ts @@ -0,0 +1,106 @@ +export * from "./common/Allow"; +export * from "./common/IsDefined"; +export * from "./common/IsOptional"; +export * from "./common/Validate"; +export * from "./common/ValidateBy"; +export * from "./common/ValidateIf"; +export * from "./common/ValidateNested"; +export * from "./common/ValidatePromise"; +export * from "./common/IsLatLong"; +export * from "./common/IsLatitude"; +export * from "./common/IsLongitude"; +export * from "./common/Equals"; +export * from "./common/NotEquals"; +export * from "./common/IsEmpty"; +export * from "./common/IsNotEmpty"; +export * from "./common/IsIn"; +export * from "./common/IsNotIn"; +export * from "./number/IsDivisibleBy"; +export * from "./number/IsPositive"; +export * from "./number/IsNegative"; +export * from "./number/Max"; +export * from "./number/Min"; +export * from "./date/MinDate"; +export * from "./date/MaxDate"; +export * from "./string/Contains"; +export * from "./string/NotContains"; +export * from "./string/IsAlpha"; +export * from "./string/IsAlphanumeric"; +export * from "./string/IsDecimal"; +export * from "./string/IsAscii"; +export * from "./string/IsBase64"; +export * from "./string/IsByteLength"; +export * from "./string/IsCreditCard"; +export * from "./string/IsCurrency"; +export * from "./string/IsEmail"; +export * from "./string/IsFQDN"; +export * from "./string/IsFullWidth"; +export * from "./string/IsHalfWidth"; +export * from "./string/IsVariableWidth"; +export * from "./string/IsHexColor"; +export * from "./string/IsHexadecimal"; +export * from "./string/IsMacAddress"; +export * from "./string/IsIP"; +export * from "./string/IsPort"; +export * from "./string/IsISBN"; +export * from "./string/IsISIN"; +export * from "./string/IsISO8601"; +export * from "./string/IsJSON"; +export * from "./string/IsJWT"; +export * from "./string/IsLowercase"; +export * from "./string/IsMobilePhone"; +export * from "./string/IsISO31661Alpha2"; +export * from "./string/IsISO31661Alpha3"; +export * from "./string/IsMongoId"; +export * from "./string/IsMultibyte"; +export * from "./string/IsSurrogatePair"; +export * from "./string/IsUrl"; +export * from "./string/IsUUID"; +export * from "./string/IsFirebasePushId"; +export * from "./string/IsUppercase"; +export * from "./string/Length"; +export * from "./string/MaxLength"; +export * from "./string/MinLength"; +export * from "./string/Matches"; +export * from "./string/IsPhoneNumber"; +export * from "./string/IsMilitaryTime"; +export * from "./string/IsHash"; +export * from "./string/IsISSN"; +export * from "./string/IsDateString"; +export * from "./string/IsBooleanString"; +export * from "./string/IsNumberString"; +export * from "./string/IsBase32"; +export * from "./string/IsBIC"; +export * from "./string/IsBtcAddress"; +export * from "./string/IsDataURI"; +export * from "./string/IsEAN"; +export * from "./string/IsEthereumAddress"; +export * from "./string/IsHSL"; +export * from "./string/IsIBAN"; +export * from "./string/IsIdentityCard"; +export * from "./string/IsISRC"; +export * from "./string/IsLocale"; +export * from "./string/IsMagnetURI"; +export * from "./string/IsMimeType"; +export * from "./string/IsOctal"; +export * from "./string/IsPassportNumber"; +export * from "./string/IsPostalCode"; +export * from "./string/IsRFC3339"; +export * from "./string/IsRgbColor"; +export * from "./string/IsSemVer"; +export * from "./typechecker/IsBoolean"; +export * from "./typechecker/IsDate"; +export * from "./typechecker/IsNumber"; +export * from "./typechecker/IsEnum"; +export * from "./typechecker/IsInt"; +export * from "./typechecker/IsString"; +export * from "./typechecker/IsArray"; +export * from "./typechecker/IsObject"; +export * from "./array/ArrayContains"; +export * from "./array/ArrayNotContains"; +export * from "./array/ArrayNotEmpty"; +export * from "./array/ArrayMinSize"; +export * from "./array/ArrayMaxSize"; +export * from "./array/ArrayUnique"; +export * from "./object/IsNotEmptyObject"; +export * from "./object/IsInstance"; diff --git a/src/node_modules/class-validator/types/decorator/number/IsDivisibleBy.d.ts b/src/node_modules/class-validator/types/decorator/number/IsDivisibleBy.d.ts new file mode 100644 index 0000000..20fda70 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/number/IsDivisibleBy.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_DIVISIBLE_BY = "isDivisibleBy"; +/** + * Checks if value is a number that's divisible by another. + */ +export declare function isDivisibleBy(value: unknown, num: number): boolean; +/** + * Checks if value is a number that's divisible by another. + */ +export declare function IsDivisibleBy(num: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/number/IsNegative.d.ts b/src/node_modules/class-validator/types/decorator/number/IsNegative.d.ts new file mode 100644 index 0000000..6e2e74b --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/number/IsNegative.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_NEGATIVE = "isNegative"; +/** + * Checks if the value is a negative number smaller than zero. + */ +export declare function isNegative(value: unknown): boolean; +/** + * Checks if the value is a negative number smaller than zero. + */ +export declare function IsNegative(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/number/IsPositive.d.ts b/src/node_modules/class-validator/types/decorator/number/IsPositive.d.ts new file mode 100644 index 0000000..f7a9a37 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/number/IsPositive.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_POSITIVE = "isPositive"; +/** + * Checks if the value is a positive number greater than zero. + */ +export declare function isPositive(value: unknown): boolean; +/** + * Checks if the value is a positive number greater than zero. + */ +export declare function IsPositive(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/number/Max.d.ts b/src/node_modules/class-validator/types/decorator/number/Max.d.ts new file mode 100644 index 0000000..bed7782 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/number/Max.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const MAX = "max"; +/** + * Checks if the first number is less than or equal to the second. + */ +export declare function max(num: unknown, max: number): boolean; +/** + * Checks if the first number is less than or equal to the second. + */ +export declare function Max(maxValue: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/number/Min.d.ts b/src/node_modules/class-validator/types/decorator/number/Min.d.ts new file mode 100644 index 0000000..78c2a68 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/number/Min.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const MIN = "min"; +/** + * Checks if the first number is greater than or equal to the second. + */ +export declare function min(num: unknown, min: number): boolean; +/** + * Checks if the first number is greater than or equal to the second. + */ +export declare function Min(minValue: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/object/IsInstance.d.ts b/src/node_modules/class-validator/types/decorator/object/IsInstance.d.ts new file mode 100644 index 0000000..bdfeb15 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/object/IsInstance.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_INSTANCE = "isInstance"; +/** + * Checks if the value is an instance of the specified object. + */ +export declare function isInstance(object: unknown, targetTypeConstructor: new (...args: any[]) => any): boolean; +/** + * Checks if the value is an instance of the specified object. + */ +export declare function IsInstance(targetType: new (...args: any[]) => any, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/object/IsNotEmptyObject.d.ts b/src/node_modules/class-validator/types/decorator/object/IsNotEmptyObject.d.ts new file mode 100644 index 0000000..51bd927 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/object/IsNotEmptyObject.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_NOT_EMPTY_OBJECT = "isNotEmptyObject"; +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +export declare function isNotEmptyObject(value: unknown): boolean; +/** + * Checks if the value is valid Object & not empty. + * Returns false if the value is not an object or an empty valid object. + */ +export declare function IsNotEmptyObject(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/Contains.d.ts b/src/node_modules/class-validator/types/decorator/string/Contains.d.ts new file mode 100644 index 0000000..4c496d5 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/Contains.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const CONTAINS = "contains"; +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +export declare function contains(value: unknown, seed: string): boolean; +/** + * Checks if the string contains the seed. + * If given value is not a string, then it returns false. + */ +export declare function Contains(seed: string, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsAlpha.d.ts b/src/node_modules/class-validator/types/decorator/string/IsAlpha.d.ts new file mode 100644 index 0000000..71d5e69 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsAlpha.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_ALPHA = "isAlpha"; +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +export declare function isAlpha(value: unknown, locale?: ValidatorJS.AlphaLocale): boolean; +/** + * Checks if the string contains only letters (a-zA-Z). + * If given value is not a string, then it returns false. + */ +export declare function IsAlpha(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsAlphanumeric.d.ts b/src/node_modules/class-validator/types/decorator/string/IsAlphanumeric.d.ts new file mode 100644 index 0000000..67d6fd2 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsAlphanumeric.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_ALPHANUMERIC = "isAlphanumeric"; +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export declare function isAlphanumeric(value: unknown, locale?: ValidatorJS.AlphanumericLocale): boolean; +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export declare function IsAlphanumeric(locale?: string, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsAscii.d.ts b/src/node_modules/class-validator/types/decorator/string/IsAscii.d.ts new file mode 100644 index 0000000..9a8a4db --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsAscii.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ASCII = "isAscii"; +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +export declare function isAscii(value: unknown): boolean; +/** + * Checks if the string contains ASCII chars only. + * If given value is not a string, then it returns false. + */ +export declare function IsAscii(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsBIC.d.ts b/src/node_modules/class-validator/types/decorator/string/IsBIC.d.ts new file mode 100644 index 0000000..08a5060 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsBIC.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_BIC = "isBIC"; +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +export declare function isBIC(value: unknown): boolean; +/** + * Check if a string is a BIC (Bank Identification Code) or SWIFT code. + * If given value is not a string, then it returns false. + */ +export declare function IsBIC(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsBase32.d.ts b/src/node_modules/class-validator/types/decorator/string/IsBase32.d.ts new file mode 100644 index 0000000..35e18a3 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsBase32.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_BASE32 = "isBase32"; +/** + * Checks if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +export declare function isBase32(value: unknown): boolean; +/** + * Check if a string is base32 encoded. + * If given value is not a string, then it returns false. + */ +export declare function IsBase32(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsBase64.d.ts b/src/node_modules/class-validator/types/decorator/string/IsBase64.d.ts new file mode 100644 index 0000000..d05fe07 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsBase64.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_BASE64 = "isBase64"; +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +export declare function isBase64(value: unknown): boolean; +/** + * Checks if a string is base64 encoded. + * If given value is not a string, then it returns false. + */ +export declare function IsBase64(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsBooleanString.d.ts b/src/node_modules/class-validator/types/decorator/string/IsBooleanString.d.ts new file mode 100644 index 0000000..92f8ac9 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsBooleanString.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_BOOLEAN_STRING = "isBooleanString"; +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +export declare function isBooleanString(value: unknown): boolean; +/** + * Checks if a string is a boolean. + * If given value is not a string, then it returns false. + */ +export declare function IsBooleanString(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsBtcAddress.d.ts b/src/node_modules/class-validator/types/decorator/string/IsBtcAddress.d.ts new file mode 100644 index 0000000..07c34f9 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsBtcAddress.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_BTC_ADDRESS = "isBtcAddress"; +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +export declare function isBtcAddress(value: unknown): boolean; +/** + * Check if the string is a valid BTC address. + * If given value is not a string, then it returns false. + */ +export declare function IsBtcAddress(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsByteLength.d.ts b/src/node_modules/class-validator/types/decorator/string/IsByteLength.d.ts new file mode 100644 index 0000000..941d1bb --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsByteLength.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_BYTE_LENGTH = "isByteLength"; +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +export declare function isByteLength(value: unknown, min: number, max?: number): boolean; +/** + * Checks if the string's length (in bytes) falls in a range. + * If given value is not a string, then it returns false. + */ +export declare function IsByteLength(min: number, max?: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsCreditCard.d.ts b/src/node_modules/class-validator/types/decorator/string/IsCreditCard.d.ts new file mode 100644 index 0000000..fd6acec --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsCreditCard.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_CREDIT_CARD = "isCreditCard"; +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +export declare function isCreditCard(value: unknown): boolean; +/** + * Checks if the string is a credit card. + * If given value is not a string, then it returns false. + */ +export declare function IsCreditCard(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsCurrency.d.ts b/src/node_modules/class-validator/types/decorator/string/IsCurrency.d.ts new file mode 100644 index 0000000..c7df3a2 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsCurrency.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_CURRENCY = "isCurrency"; +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +export declare function isCurrency(value: unknown, options?: ValidatorJS.IsCurrencyOptions): boolean; +/** + * Checks if the string is a valid currency amount. + * If given value is not a string, then it returns false. + */ +export declare function IsCurrency(options?: ValidatorJS.IsCurrencyOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsDataURI.d.ts b/src/node_modules/class-validator/types/decorator/string/IsDataURI.d.ts new file mode 100644 index 0000000..bbc6088 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsDataURI.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_DATA_URI = "isDataURI"; +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +export declare function isDataURI(value: unknown): boolean; +/** + * Check if the string is a data uri format. + * If given value is not a string, then it returns false. + */ +export declare function IsDataURI(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsDateString.d.ts b/src/node_modules/class-validator/types/decorator/string/IsDateString.d.ts new file mode 100644 index 0000000..fda1356 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsDateString.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_DATE_STRING = "isDateString"; +/** + * Checks if a given value is a ISOString date. + */ +export declare function isDateString(value: unknown): boolean; +/** + * Checks if a given value is a ISOString date. + */ +export declare function IsDateString(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsDecimal.d.ts b/src/node_modules/class-validator/types/decorator/string/IsDecimal.d.ts new file mode 100644 index 0000000..497ab75 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsDecimal.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_DECIMAL = "isDecimal"; +/** + * Checks if the string is a valid decimal. + * If given value is not a string, then it returns false. + */ +export declare function isDecimal(value: unknown, options?: ValidatorJS.IsDecimalOptions): boolean; +/** + * Checks if the string contains only letters and numbers. + * If given value is not a string, then it returns false. + */ +export declare function IsDecimal(options?: ValidatorJS.IsDecimalOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsEAN.d.ts b/src/node_modules/class-validator/types/decorator/string/IsEAN.d.ts new file mode 100644 index 0000000..51d1d52 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsEAN.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_EAN = "isEAN"; +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +export declare function isEAN(value: unknown): boolean; +/** + * Check if the string is an EAN (European Article Number). + * If given value is not a string, then it returns false. + */ +export declare function IsEAN(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsEmail.d.ts b/src/node_modules/class-validator/types/decorator/string/IsEmail.d.ts new file mode 100644 index 0000000..53ca531 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsEmail.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_EMAIL = "isEmail"; +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +export declare function isEmail(value: unknown, options?: ValidatorJS.IsEmailOptions): boolean; +/** + * Checks if the string is an email. + * If given value is not a string, then it returns false. + */ +export declare function IsEmail(options?: ValidatorJS.IsEmailOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsEthereumAddress.d.ts b/src/node_modules/class-validator/types/decorator/string/IsEthereumAddress.d.ts new file mode 100644 index 0000000..2982926 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsEthereumAddress.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ETHEREUM_ADDRESS = "isEthereumAddress"; +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +export declare function isEthereumAddress(value: unknown): boolean; +/** + * Check if the string is an Ethereum address using basic regex. Does not validate address checksums. + * If given value is not a string, then it returns false. + */ +export declare function IsEthereumAddress(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsFQDN.d.ts b/src/node_modules/class-validator/types/decorator/string/IsFQDN.d.ts new file mode 100644 index 0000000..d941844 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsFQDN.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_FQDN = "isFqdn"; +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +export declare function isFQDN(value: unknown, options?: ValidatorJS.IsFQDNOptions): boolean; +/** + * Checks if the string is a fully qualified domain name (e.g. domain.com). + * If given value is not a string, then it returns false. + */ +export declare function IsFQDN(options?: ValidatorJS.IsFQDNOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsFirebasePushId.d.ts b/src/node_modules/class-validator/types/decorator/string/IsFirebasePushId.d.ts new file mode 100644 index 0000000..ad7c095 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsFirebasePushId.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_FIREBASE_PUSH_ID = "IsFirebasePushId"; +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +export declare function isFirebasePushId(value: unknown): boolean; +/** + * Checks if the string is a Firebase Push Id + * If given value is not a Firebase Push Id, it returns false + */ +export declare function IsFirebasePushId(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsFullWidth.d.ts b/src/node_modules/class-validator/types/decorator/string/IsFullWidth.d.ts new file mode 100644 index 0000000..9c7e89d --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsFullWidth.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_FULL_WIDTH = "isFullWidth"; +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export declare function isFullWidth(value: unknown): boolean; +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export declare function IsFullWidth(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsHSL.d.ts b/src/node_modules/class-validator/types/decorator/string/IsHSL.d.ts new file mode 100644 index 0000000..80e2494 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsHSL.d.ts @@ -0,0 +1,14 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_HSL = "isHSL"; +/** +* Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +export declare function isHSL(value: unknown): boolean; +/** + * Check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on CSS Colors Level 4 specification. + * Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: hsl(200grad+.1%62%/1)). + * If given value is not a string, then it returns false. + */ +export declare function IsHSL(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsHalfWidth.d.ts b/src/node_modules/class-validator/types/decorator/string/IsHalfWidth.d.ts new file mode 100644 index 0000000..ef498ab --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsHalfWidth.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_HALF_WIDTH = "isHalfWidth"; +/** + * Checks if the string contains any half-width chars. + * If given value is not a string, then it returns false. + */ +export declare function isHalfWidth(value: unknown): boolean; +/** + * Checks if the string contains any full-width chars. + * If given value is not a string, then it returns false. + */ +export declare function IsHalfWidth(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsHash.d.ts b/src/node_modules/class-validator/types/decorator/string/IsHash.d.ts new file mode 100644 index 0000000..8c70a9d --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsHash.d.ts @@ -0,0 +1,15 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_HASH = "isHash"; +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +export declare function isHash(value: unknown, algorithm: ValidatorJS.HashAlgorithm): boolean; +/** + * Check if the string is a hash of type algorithm. + * Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', + * 'tiger160', 'tiger192', 'crc32', 'crc32b'] + */ +export declare function IsHash(algorithm: string, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsHexColor.d.ts b/src/node_modules/class-validator/types/decorator/string/IsHexColor.d.ts new file mode 100644 index 0000000..0bb72dd --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsHexColor.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_HEX_COLOR = "isHexColor"; +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +export declare function isHexColor(value: unknown): boolean; +/** + * Checks if the string is a hexadecimal color. + * If given value is not a string, then it returns false. + */ +export declare function IsHexColor(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsHexadecimal.d.ts b/src/node_modules/class-validator/types/decorator/string/IsHexadecimal.d.ts new file mode 100644 index 0000000..b901ce9 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsHexadecimal.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_HEXADECIMAL = "isHexadecimal"; +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +export declare function isHexadecimal(value: unknown): boolean; +/** + * Checks if the string is a hexadecimal number. + * If given value is not a string, then it returns false. + */ +export declare function IsHexadecimal(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsIBAN.d.ts b/src/node_modules/class-validator/types/decorator/string/IsIBAN.d.ts new file mode 100644 index 0000000..8f598cd --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsIBAN.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_IBAN = "isIBAN"; +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +export declare function isIBAN(value: unknown): boolean; +/** + * Check if a string is a IBAN (International Bank Account Number). + * If given value is not a string, then it returns false. + */ +export declare function IsIBAN(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsIP.d.ts b/src/node_modules/class-validator/types/decorator/string/IsIP.d.ts new file mode 100644 index 0000000..f2e96d7 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsIP.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare type IsIpVersion = "4" | "6" | 4 | 6; +export declare const IS_IP = "isIp"; +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +export declare function isIP(value: unknown, version?: IsIpVersion): boolean; +/** + * Checks if the string is an IP (version 4 or 6). + * If given value is not a string, then it returns false. + */ +export declare function IsIP(version?: IsIpVersion, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsISBN.d.ts b/src/node_modules/class-validator/types/decorator/string/IsISBN.d.ts new file mode 100644 index 0000000..f762922 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsISBN.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare type IsISBNVersion = "10" | "13" | 10 | 13; +export declare const IS_ISBN = "isIsbn"; +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +export declare function isISBN(value: unknown, version?: IsISBNVersion): boolean; +/** + * Checks if the string is an ISBN (version 10 or 13). + * If given value is not a string, then it returns false. + */ +export declare function IsISBN(version?: IsISBNVersion, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsISIN.d.ts b/src/node_modules/class-validator/types/decorator/string/IsISIN.d.ts new file mode 100644 index 0000000..f971ef6 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsISIN.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ISIN = "isIsin"; +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +export declare function isISIN(value: unknown): boolean; +/** + * Checks if the string is an ISIN (stock/security identifier). + * If given value is not a string, then it returns false. + */ +export declare function IsISIN(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha2.d.ts b/src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha2.d.ts new file mode 100644 index 0000000..9ca010f --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha2.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ISO31661_ALPHA_2 = "isISO31661Alpha2"; +/** + * 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. + */ +export declare function isISO31661Alpha2(value: unknown): boolean; +/** + * 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. + */ +export declare function IsISO31661Alpha2(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha3.d.ts b/src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha3.d.ts new file mode 100644 index 0000000..01f7196 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsISO31661Alpha3.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ISO31661_ALPHA_3 = "isISO31661Alpha3"; +/** + * 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. + */ +export declare function isISO31661Alpha3(value: unknown): boolean; +/** + * 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. + */ +export declare function IsISO31661Alpha3(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsISO8601.d.ts b/src/node_modules/class-validator/types/decorator/string/IsISO8601.d.ts new file mode 100644 index 0000000..6a62e77 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsISO8601.d.ts @@ -0,0 +1,15 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_ISO8601 = "isIso8601"; +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +export declare function isISO8601(value: unknown, options?: ValidatorJS.IsISO8601Options): boolean; +/** + * Checks if the string is a valid ISO 8601 date. + * If given value is not a string, then it returns false. + * Use the option strict = true for additional checks for a valid date, e.g. invalidates dates like 2019-02-29. + */ +export declare function IsISO8601(options?: ValidatorJS.IsISO8601Options, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsISRC.d.ts b/src/node_modules/class-validator/types/decorator/string/IsISRC.d.ts new file mode 100644 index 0000000..4b4eb8a --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsISRC.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ISRC = "isISRC"; +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +export declare function isISRC(value: unknown): boolean; +/** + * Check if the string is a ISRC. + * If given value is not a string, then it returns false. + */ +export declare function IsISRC(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsISSN.d.ts b/src/node_modules/class-validator/types/decorator/string/IsISSN.d.ts new file mode 100644 index 0000000..d9b30bd --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsISSN.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_ISSN = "isISSN"; +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +export declare function isISSN(value: unknown, options?: ValidatorJS.IsISSNOptions): boolean; +/** + * Checks if the string is a ISSN. + * If given value is not a string, then it returns false. + */ +export declare function IsISSN(options?: ValidatorJS.IsISSNOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsIdentityCard.d.ts b/src/node_modules/class-validator/types/decorator/string/IsIdentityCard.d.ts new file mode 100644 index 0000000..b47c9eb --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsIdentityCard.d.ts @@ -0,0 +1,17 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_IDENTITY_CARD = "isIdentityCard"; +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +export declare function isIdentityCard(value: unknown, locale: ValidatorJS.IdentityCardLocale): boolean; +/** + * Check if the string is a valid identity card code. + * 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. + * Defaults to 'any'. + * If given value is not a string, then it returns false. + */ +export declare function IsIdentityCard(locale?: ValidatorJS.IdentityCardLocale, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsJSON.d.ts b/src/node_modules/class-validator/types/decorator/string/IsJSON.d.ts new file mode 100644 index 0000000..cd91042 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsJSON.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_JSON = "isJson"; +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +export declare function isJSON(value: unknown): boolean; +/** + * Checks if the string is valid JSON (note: uses JSON.parse). + * If given value is not a string, then it returns false. + */ +export declare function IsJSON(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsJWT.d.ts b/src/node_modules/class-validator/types/decorator/string/IsJWT.d.ts new file mode 100644 index 0000000..1df1b9b --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsJWT.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_JWT = "isJwt"; +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +export declare function isJWT(value: unknown): boolean; +/** + * Checks if the string is valid JWT token. + * If given value is not a string, then it returns false. + */ +export declare function IsJWT(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsLocale.d.ts b/src/node_modules/class-validator/types/decorator/string/IsLocale.d.ts new file mode 100644 index 0000000..8ea12ed --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsLocale.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_LOCALE = "isLocale"; +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +export declare function isLocale(value: unknown): boolean; +/** + * Check if the string is a locale. + * If given value is not a string, then it returns false. + */ +export declare function IsLocale(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsLowercase.d.ts b/src/node_modules/class-validator/types/decorator/string/IsLowercase.d.ts new file mode 100644 index 0000000..65b3588 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsLowercase.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_LOWERCASE = "isLowercase"; +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +export declare function isLowercase(value: unknown): boolean; +/** + * Checks if the string is lowercase. + * If given value is not a string, then it returns false. + */ +export declare function IsLowercase(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsMacAddress.d.ts b/src/node_modules/class-validator/types/decorator/string/IsMacAddress.d.ts new file mode 100644 index 0000000..e0d1960 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsMacAddress.d.ts @@ -0,0 +1,14 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_MAC_ADDRESS = "isMacAddress"; +/** + * Check if the string is a MAC address. + * If given value is not a string, then it returns false. + */ +export declare function isMACAddress(value: unknown, options?: ValidatorJS.IsMACAddressOptions): boolean; +/** + * Check if the string is a MAC address. + * If given value is not a string, then it returns false. + */ +export declare function IsMACAddress(optionsArg?: ValidatorJS.IsMACAddressOptions, validationOptionsArg?: ValidationOptions): PropertyDecorator; +export declare function IsMACAddress(validationOptionsArg?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsMagnetURI.d.ts b/src/node_modules/class-validator/types/decorator/string/IsMagnetURI.d.ts new file mode 100644 index 0000000..828c1fe --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsMagnetURI.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_MAGNET_URI = "isMagnetURI"; +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +export declare function isMagnetURI(value: unknown): boolean; +/** + * Check if the string is a magnet uri format. + * If given value is not a string, then it returns false. + */ +export declare function IsMagnetURI(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsMilitaryTime.d.ts b/src/node_modules/class-validator/types/decorator/string/IsMilitaryTime.d.ts new file mode 100644 index 0000000..fcdb17a --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsMilitaryTime.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_MILITARY_TIME = "isMilitaryTime"; +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +export declare function isMilitaryTime(value: unknown): boolean; +/** + * Checks if the string represents a time without a given timezone in the format HH:MM (military) + * If the given value does not match the pattern HH:MM, then it returns false. + */ +export declare function IsMilitaryTime(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsMimeType.d.ts b/src/node_modules/class-validator/types/decorator/string/IsMimeType.d.ts new file mode 100644 index 0000000..fc43897 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsMimeType.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_MIME_TYPE = "isMimeType"; +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +export declare function isMimeType(value: unknown): boolean; +/** + * Check if the string matches to a valid MIME type format + * If given value is not a string, then it returns false. + */ +export declare function IsMimeType(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsMobilePhone.d.ts b/src/node_modules/class-validator/types/decorator/string/IsMobilePhone.d.ts new file mode 100644 index 0000000..f9d527f --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsMobilePhone.d.ts @@ -0,0 +1,29 @@ +import { ValidationOptions } from "../ValidationOptions"; +import validator from "validator"; +export declare const IS_MOBILE_PHONE = "isMobilePhone"; +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +export declare function isMobilePhone(value: unknown, locale?: validator.MobilePhoneLocale, options?: validator.IsMobilePhoneOptions): boolean; +/** + * Checks if the string is a mobile phone number (locale is either an array of locales (e.g ['sk-SK', 'sr-RS']) + * 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', + * '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', + * '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', + * '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', + * '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', + * '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', + * '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', + * 'zh-HK', 'zh-MO', 'zh-TW'] + * If given value is not a string, then it returns false. + */ +export declare function IsMobilePhone(locale?: validator.MobilePhoneLocale, options?: validator.IsMobilePhoneOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsMongoId.d.ts b/src/node_modules/class-validator/types/decorator/string/IsMongoId.d.ts new file mode 100644 index 0000000..0ff909f --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsMongoId.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_MONGO_ID = "isMongoId"; +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +export declare function isMongoId(value: unknown): boolean; +/** + * Checks if the string is a valid hex-encoded representation of a MongoDB ObjectId. + * If given value is not a string, then it returns false. + */ +export declare function IsMongoId(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsMultibyte.d.ts b/src/node_modules/class-validator/types/decorator/string/IsMultibyte.d.ts new file mode 100644 index 0000000..99eb90e --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsMultibyte.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_MULTIBYTE = "isMultibyte"; +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +export declare function isMultibyte(value: unknown): boolean; +/** + * Checks if the string contains one or more multibyte chars. + * If given value is not a string, then it returns false. + */ +export declare function IsMultibyte(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsNumberString.d.ts b/src/node_modules/class-validator/types/decorator/string/IsNumberString.d.ts new file mode 100644 index 0000000..18f8460 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsNumberString.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_NUMBER_STRING = "isNumberString"; +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +export declare function isNumberString(value: unknown, options?: ValidatorJS.IsNumericOptions): boolean; +/** + * Checks if the string is numeric. + * If given value is not a string, then it returns false. + */ +export declare function IsNumberString(options?: ValidatorJS.IsNumericOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsOctal.d.ts b/src/node_modules/class-validator/types/decorator/string/IsOctal.d.ts new file mode 100644 index 0000000..5e8e3fe --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsOctal.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_OCTAL = "isOctal"; +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +export declare function isOctal(value: unknown): boolean; +/** + * Check if the string is a valid octal number. + * If given value is not a string, then it returns false. + */ +export declare function IsOctal(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsPassportNumber.d.ts b/src/node_modules/class-validator/types/decorator/string/IsPassportNumber.d.ts new file mode 100644 index 0000000..3436270 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsPassportNumber.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_PASSPORT_NUMBER = "isPassportNumber"; +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +export declare function isPassportNumber(value: unknown, countryCode: string): boolean; +/** + * Check if the string is a valid passport number relative to a specific country code. + * If given value is not a string, then it returns false. + */ +export declare function IsPassportNumber(countryCode: string, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsPhoneNumber.d.ts b/src/node_modules/class-validator/types/decorator/string/IsPhoneNumber.d.ts new file mode 100644 index 0000000..66cfb11 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsPhoneNumber.d.ts @@ -0,0 +1,17 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_PHONE_NUMBER = "isPhoneNumber"; +/** + * Checks if the string is a valid phone number. + * @param value the potential phone number string to test + * @param {string} region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +export declare function isPhoneNumber(value: string, region: string | null): boolean; +/** + * Checks if the string is a valid phone number. + * @param region 2 characters uppercase country code (e.g. DE, US, CH). + * If users must enter the intl. prefix (e.g. +41), then you may pass "ZZ" or null as region. + * See [google-libphonenumber, metadata.js:countryCodeToRegionCodeMap on github]{@link https://github.com/ruimarinho/google-libphonenumber/blob/1e46138878cff479aafe2ce62175c6c49cb58720/src/metadata.js#L33} + */ +export declare function IsPhoneNumber(region: string | null, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsPort.d.ts b/src/node_modules/class-validator/types/decorator/string/IsPort.d.ts new file mode 100644 index 0000000..bdd1e6b --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsPort.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_PORT = "isPort"; +/** + * Check if the string is a valid port number. + */ +export declare function isPort(value: unknown): boolean; +/** + * Check if the string is a valid port number. + */ +export declare function IsPort(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsPostalCode.d.ts b/src/node_modules/class-validator/types/decorator/string/IsPostalCode.d.ts new file mode 100644 index 0000000..2491761 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsPostalCode.d.ts @@ -0,0 +1,15 @@ +import { ValidationOptions } from "../ValidationOptions"; +import validator from "validator"; +export declare const IS_POSTAL_CODE = "isPostalCode"; +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +export declare function isPostalCode(value: unknown, locale: validator.PostalCodeLocale): boolean; +/** + * Check if the string is a postal code, + * (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.). + * If given value is not a string, then it returns false. + */ +export declare function IsPostalCode(locale?: validator.PostalCodeLocale, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsRFC3339.d.ts b/src/node_modules/class-validator/types/decorator/string/IsRFC3339.d.ts new file mode 100644 index 0000000..d82bf93 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsRFC3339.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_RFC_3339 = "isRFC3339"; +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +export declare function isRFC3339(value: unknown): boolean; +/** + * Check if the string is a valid RFC 3339 date. + * If given value is not a string, then it returns false. + */ +export declare function IsRFC3339(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsRgbColor.d.ts b/src/node_modules/class-validator/types/decorator/string/IsRgbColor.d.ts new file mode 100644 index 0000000..4b027a8 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsRgbColor.d.ts @@ -0,0 +1,14 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_RGB_COLOR = "isRgbColor"; +/** +* Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +export declare function isRgbColor(value: unknown, includePercentValues?: boolean): boolean; +/** + * Check if the string is a rgb or rgba color. + * `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. + * If given value is not a string, then it returns false. + */ +export declare function IsRgbColor(includePercentValues?: boolean, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsSemVer.d.ts b/src/node_modules/class-validator/types/decorator/string/IsSemVer.d.ts new file mode 100644 index 0000000..c427412 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsSemVer.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_SEM_VER = "isSemVer"; +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +export declare function isSemVer(value: unknown): boolean; +/** + * Check if the string is a Semantic Versioning Specification (SemVer). + * If given value is not a string, then it returns false. + */ +export declare function IsSemVer(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsSurrogatePair.d.ts b/src/node_modules/class-validator/types/decorator/string/IsSurrogatePair.d.ts new file mode 100644 index 0000000..3680af2 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsSurrogatePair.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_SURROGATE_PAIR = "isSurrogatePair"; +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +export declare function isSurrogatePair(value: unknown): boolean; +/** + * Checks if the string contains any surrogate pairs chars. + * If given value is not a string, then it returns false. + */ +export declare function IsSurrogatePair(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsUUID.d.ts b/src/node_modules/class-validator/types/decorator/string/IsUUID.d.ts new file mode 100644 index 0000000..89ef501 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsUUID.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare type UUIDVersion = "3" | "4" | "5" | "all" | 3 | 4 | 5; +export declare const IS_UUID = "isUuid"; +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +export declare function isUUID(value: unknown, version?: UUIDVersion): boolean; +/** + * Checks if the string is a UUID (version 3, 4 or 5). + * If given value is not a string, then it returns false. + */ +export declare function IsUUID(version?: UUIDVersion, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsUppercase.d.ts b/src/node_modules/class-validator/types/decorator/string/IsUppercase.d.ts new file mode 100644 index 0000000..e7cd103 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsUppercase.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_UPPERCASE = "isUppercase"; +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +export declare function isUppercase(value: unknown): boolean; +/** + * Checks if the string is uppercase. + * If given value is not a string, then it returns false. + */ +export declare function IsUppercase(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsUrl.d.ts b/src/node_modules/class-validator/types/decorator/string/IsUrl.d.ts new file mode 100644 index 0000000..90eb897 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsUrl.d.ts @@ -0,0 +1,13 @@ +import { ValidationOptions } from "../ValidationOptions"; +import ValidatorJS from "validator"; +export declare const IS_URL = "isUrl"; +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +export declare function isURL(value: string, options?: ValidatorJS.IsURLOptions): boolean; +/** + * Checks if the string is an url. + * If given value is not a string, then it returns false. + */ +export declare function IsUrl(options?: ValidatorJS.IsURLOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/IsVariableWidth.d.ts b/src/node_modules/class-validator/types/decorator/string/IsVariableWidth.d.ts new file mode 100644 index 0000000..c44604e --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/IsVariableWidth.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_VARIABLE_WIDTH = "isVariableWidth"; +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +export declare function isVariableWidth(value: unknown): boolean; +/** + * Checks if the string contains variable-width chars. + * If given value is not a string, then it returns false. + */ +export declare function IsVariableWidth(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/Length.d.ts b/src/node_modules/class-validator/types/decorator/string/Length.d.ts new file mode 100644 index 0000000..e92fb9a --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/Length.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const LENGTH = "length"; +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export declare function length(value: unknown, min: number, max?: number): boolean; +/** + * Checks if the string's length falls in a range. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export declare function Length(min: number, max?: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/Matches.d.ts b/src/node_modules/class-validator/types/decorator/string/Matches.d.ts new file mode 100644 index 0000000..927271e --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/Matches.d.ts @@ -0,0 +1,14 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const MATCHES = "matches"; +/** + * Checks if string matches the pattern. Either matches('foo', /foo/i). + * If given value is not a string, then it returns false. + */ +export declare function matches(value: string, pattern: RegExp): boolean; +export declare function matches(value: string, pattern: string, modifiers: string): boolean; +/** + * Checks if string matches the pattern. Either matches('foo', /foo/i) + * If given value is not a string, then it returns false. + */ +export declare function Matches(pattern: RegExp, validationOptions?: ValidationOptions): PropertyDecorator; +export declare function Matches(pattern: string, modifiers?: string, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/MaxLength.d.ts b/src/node_modules/class-validator/types/decorator/string/MaxLength.d.ts new file mode 100644 index 0000000..26323b9 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/MaxLength.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const MAX_LENGTH = "maxLength"; +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export declare function maxLength(value: unknown, max: number): boolean; +/** + * Checks if the string's length is not more than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export declare function MaxLength(max: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/MinLength.d.ts b/src/node_modules/class-validator/types/decorator/string/MinLength.d.ts new file mode 100644 index 0000000..ccd53e0 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/MinLength.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const MIN_LENGTH = "minLength"; +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export declare function minLength(value: unknown, min: number): boolean; +/** + * Checks if the string's length is not less than given number. Note: this function takes into account surrogate pairs. + * If given value is not a string, then it returns false. + */ +export declare function MinLength(min: number, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/string/NotContains.d.ts b/src/node_modules/class-validator/types/decorator/string/NotContains.d.ts new file mode 100644 index 0000000..5f6a00b --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/string/NotContains.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const NOT_CONTAINS = "notContains"; +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +export declare function notContains(value: unknown, seed: string): boolean; +/** + * Checks if the string does not contain the seed. + * If given value is not a string, then it returns false. + */ +export declare function NotContains(seed: string, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsArray.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsArray.d.ts new file mode 100644 index 0000000..64f026e --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsArray.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ARRAY = "isArray"; +/** + * Checks if a given value is an array + */ +export declare function isArray(value: unknown): boolean; +/** + * Checks if a given value is an array + */ +export declare function IsArray(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsBoolean.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsBoolean.d.ts new file mode 100644 index 0000000..3529175 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsBoolean.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_BOOLEAN = "isBoolean"; +/** + * Checks if a given value is a number. + */ +export declare function isBoolean(value: unknown): boolean; +/** + * Checks if a value is a number. + */ +export declare function IsBoolean(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsDate.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsDate.d.ts new file mode 100644 index 0000000..1792145 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsDate.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_DATE = "isDate"; +/** + * Checks if a given value is a number. + */ +export declare function isDate(value: unknown): boolean; +/** + * Checks if a value is a number. + */ +export declare function IsDate(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsEnum.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsEnum.d.ts new file mode 100644 index 0000000..cfc97ac --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsEnum.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_ENUM = "isEnum"; +/** + * Checks if a given value is an enum + */ +export declare function isEnum(value: unknown, entity: any): boolean; +/** + * Checks if a given value is an enum + */ +export declare function IsEnum(entity: Object, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsInt.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsInt.d.ts new file mode 100644 index 0000000..bb30c17 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsInt.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_INT = "isInt"; +/** + * Checks if value is an integer. + */ +export declare function isInt(val: unknown): boolean; +/** + * Checks if value is an integer. + */ +export declare function IsInt(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsNumber.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsNumber.d.ts new file mode 100644 index 0000000..ae866b3 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsNumber.d.ts @@ -0,0 +1,18 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_NUMBER = "isNumber"; +/** + * Options to be passed to IsNumber decorator. + */ +export interface IsNumberOptions { + allowNaN?: boolean; + allowInfinity?: boolean; + maxDecimalPlaces?: number; +} +/** + * Checks if a given value is a number. + */ +export declare function isNumber(value: unknown, options?: IsNumberOptions): boolean; +/** + * Checks if a value is a number. + */ +export declare function IsNumber(options?: IsNumberOptions, validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsObject.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsObject.d.ts new file mode 100644 index 0000000..2bcd2e0 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsObject.d.ts @@ -0,0 +1,12 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_OBJECT = "isObject"; +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +export declare function isObject(value: unknown): value is object; +/** + * Checks if the value is valid Object. + * Returns false if the value is not an object. + */ +export declare function IsObject(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/decorator/typechecker/IsString.d.ts b/src/node_modules/class-validator/types/decorator/typechecker/IsString.d.ts new file mode 100644 index 0000000..1683c87 --- /dev/null +++ b/src/node_modules/class-validator/types/decorator/typechecker/IsString.d.ts @@ -0,0 +1,10 @@ +import { ValidationOptions } from "../ValidationOptions"; +export declare const IS_STRING = "isString"; +/** +* Checks if a given value is a real string. +*/ +export declare function isString(value: unknown): value is string; +/** +* Checks if a given value is a real string. +*/ +export declare function IsString(validationOptions?: ValidationOptions): PropertyDecorator; diff --git a/src/node_modules/class-validator/types/index.d.ts b/src/node_modules/class-validator/types/index.d.ts new file mode 100644 index 0000000..2010c56 --- /dev/null +++ b/src/node_modules/class-validator/types/index.d.ts @@ -0,0 +1,47 @@ +import { ValidationError } from "./validation/ValidationError"; +import { ValidatorOptions } from "./validation/ValidatorOptions"; +import { ValidationSchema } from "./validation-schema/ValidationSchema"; +export * from "./container"; +export * from "./decorator/decorators"; +export * from "./decorator/ValidationOptions"; +export * from "./validation/ValidatorConstraintInterface"; +export * from "./validation/ValidationError"; +export * from "./validation/ValidatorOptions"; +export * from "./validation/ValidationArguments"; +export * from "./validation/ValidationTypes"; +export * from "./validation/Validator"; +export * from "./validation-schema/ValidationSchema"; +export * from "./register-decorator"; +export * from "./metadata/MetadataStorage"; +/** + * Validates given object. + */ +export declare function validate(object: Object, validatorOptions?: ValidatorOptions): Promise; +/** + * Validates given object by a given validation schema. + */ +export declare function validate(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): Promise; +/** + * Validates given object and reject on error. + */ +export declare function validateOrReject(object: Object, validatorOptions?: ValidatorOptions): Promise; +/** + * Validates given object by a given validation schema and reject on error. + */ +export declare function validateOrReject(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): Promise; +/** + * Performs sync validation of the given object. + * Note that this method completely ignores async validations. + * If you want to properly perform validation you need to call validate method instead. + */ +export declare function validateSync(object: Object, validatorOptions?: ValidatorOptions): ValidationError[]; +/** + * Validates given object by a given validation schema. + * Note that this method completely ignores async validations. + * If you want to properly perform validation you need to call validate method instead. + */ +export declare function validateSync(schemaName: string, object: Object, validatorOptions?: ValidatorOptions): ValidationError[]; +/** + * Registers a new validation schema. + */ +export declare function registerSchema(schema: ValidationSchema): void; diff --git a/src/node_modules/class-validator/types/metadata/ConstraintMetadata.d.ts b/src/node_modules/class-validator/types/metadata/ConstraintMetadata.d.ts new file mode 100644 index 0000000..51e8166 --- /dev/null +++ b/src/node_modules/class-validator/types/metadata/ConstraintMetadata.d.ts @@ -0,0 +1,23 @@ +import { ValidatorConstraintInterface } from "../validation/ValidatorConstraintInterface"; +/** + * This metadata interface contains information for custom validators. + */ +export declare class ConstraintMetadata { + /** + * Target class which performs validation. + */ + target: Function; + /** + * Custom validation's name, that will be used as validation error type. + */ + name: string; + /** + * Indicates if this validation is asynchronous or not. + */ + async: boolean; + constructor(target: Function, name?: string, async?: boolean); + /** + * Instance of the target custom validation class which performs validation. + */ + readonly instance: ValidatorConstraintInterface; +} diff --git a/src/node_modules/class-validator/types/metadata/MetadataStorage.d.ts b/src/node_modules/class-validator/types/metadata/MetadataStorage.d.ts new file mode 100644 index 0000000..298d35a --- /dev/null +++ b/src/node_modules/class-validator/types/metadata/MetadataStorage.d.ts @@ -0,0 +1,42 @@ +import { ValidationMetadata } from "./ValidationMetadata"; +import { ConstraintMetadata } from "./ConstraintMetadata"; +import { ValidationSchema } from "../validation-schema/ValidationSchema"; +/** + * Gets metadata storage. + * Metadata storage follows the best practices and stores metadata in a global variable. + */ +export declare function getMetadataStorage(): MetadataStorage; +/** + * Storage all metadatas. + */ +export declare class MetadataStorage { + private validationMetadatas; + private constraintMetadatas; + readonly hasValidationMetaData: boolean; + /** + * Adds a new validation metadata. + */ + addValidationSchema(schema: ValidationSchema): void; + /** + * Adds a new validation metadata. + */ + addValidationMetadata(metadata: ValidationMetadata): void; + /** + * Adds a new constraint metadata. + */ + addConstraintMetadata(metadata: ConstraintMetadata): void; + /** + * Groups metadata by their property names. + */ + groupByPropertyName(metadata: ValidationMetadata[]): { + [propertyName: string]: ValidationMetadata[]; + }; + /** + * Gets all validation metadatas for the given object with the given groups. + */ + getTargetValidationMetadatas(targetConstructor: Function, targetSchema: string, groups?: string[]): ValidationMetadata[]; + /** + * Gets all validator constraints for the given object. + */ + getTargetValidatorConstraints(target: Function): ConstraintMetadata[]; +} diff --git a/src/node_modules/class-validator/types/metadata/ValidationMetadata.d.ts b/src/node_modules/class-validator/types/metadata/ValidationMetadata.d.ts new file mode 100644 index 0000000..ab46279 --- /dev/null +++ b/src/node_modules/class-validator/types/metadata/ValidationMetadata.d.ts @@ -0,0 +1,49 @@ +import { ValidationMetadataArgs } from "./ValidationMetadataArgs"; +import { ValidationArguments } from "../validation/ValidationArguments"; +/** + * This metadata contains validation rules. + */ +export declare class ValidationMetadata { + /** + * Validation type. + */ + type: string; + /** + * Target class to which this validation is applied. + */ + target: Function | string; + /** + * Property of the object to be validated. + */ + propertyName: string; + /** + * Constraint class that performs validation. Used only for custom validations. + */ + constraintCls: Function; + /** + * Array of constraints of this validation. + */ + constraints: any[]; + /** + * Validation message to be shown in the case of error. + */ + message: string | ((args: ValidationArguments) => string); + /** + * Validation groups used for this validation. + */ + groups: string[]; + /** + * Indicates if validation must be performed always, no matter of validation groups used. + */ + always: boolean; + /** + * Specifies if validated value is an array and each of its item must be validated. + */ + each: boolean; + context?: any; + /** + * Extra options specific to validation type. + */ + validationTypeOptions: any; + constructor(args: ValidationMetadataArgs); +} diff --git a/src/node_modules/class-validator/types/metadata/ValidationMetadataArgs.d.ts b/src/node_modules/class-validator/types/metadata/ValidationMetadataArgs.d.ts new file mode 100644 index 0000000..5aa1b86 --- /dev/null +++ b/src/node_modules/class-validator/types/metadata/ValidationMetadataArgs.d.ts @@ -0,0 +1,34 @@ +import { ValidationOptions } from "../decorator/ValidationOptions"; +/** + * Constructor arguments for ValidationMetadata class. + */ +export interface ValidationMetadataArgs { + /** + * Validation type. + */ + type: string; + /** + * Object that is used to be validated. + */ + target: Function | string; + /** + * Property of the object to be validated. + */ + propertyName: string; + /** + * Constraint class that performs validation. Used only for custom validations. + */ + constraintCls?: Function; + /** + * Array of constraints of this validation. + */ + constraints?: any[]; + /** + * Validation options. + */ + validationOptions?: ValidationOptions; + /** + * Extra options specific to validation type. + */ + validationTypeOptions?: any; +} diff --git a/src/node_modules/class-validator/types/register-decorator.d.ts b/src/node_modules/class-validator/types/register-decorator.d.ts new file mode 100644 index 0000000..1edaed8 --- /dev/null +++ b/src/node_modules/class-validator/types/register-decorator.d.ts @@ -0,0 +1,36 @@ +import { ValidatorConstraintInterface } from "./validation/ValidatorConstraintInterface"; +import { ValidationOptions } from "./decorator/ValidationOptions"; +export interface ValidationDecoratorOptions { + /** + * Target object to be validated. + */ + target: Function; + /** + * Target object's property name to be validated. + */ + propertyName: string; + /** + * Name of the validation that is being registered. + */ + name?: string; + /** + * Indicates if this decorator will perform async validation. + */ + async?: boolean; + /** + * Validator options. + */ + options?: ValidationOptions; + /** + * Array of validation constraints. + */ + constraints?: any[]; + /** + * Validator that performs validation. + */ + validator: ValidatorConstraintInterface | Function; +} +/** + * Registers a custom validation decorator. + */ +export declare function registerDecorator(options: ValidationDecoratorOptions): void; diff --git a/src/node_modules/class-validator/types/utils.d.ts b/src/node_modules/class-validator/types/utils.d.ts new file mode 100644 index 0000000..95e103f --- /dev/null +++ b/src/node_modules/class-validator/types/utils.d.ts @@ -0,0 +1,5 @@ +export declare function isPromise(p: any): p is Promise; +/** + * Convert Map, Set to Array + */ +export declare function convertToArray(val: Array | Set | Map): Array; diff --git a/src/node_modules/class-validator/types/validation-schema/ValidationSchema.d.ts b/src/node_modules/class-validator/types/validation-schema/ValidationSchema.d.ts new file mode 100644 index 0000000..4e7eed7 --- /dev/null +++ b/src/node_modules/class-validator/types/validation-schema/ValidationSchema.d.ts @@ -0,0 +1,53 @@ +/** + * Validation schema is a decorator-free way of validation of your objects. + * Also using validation schemas makes this library to be easily used with es6/es5. + */ +export interface ValidationSchema { + /** + * Schema name. This is required, because we tell validator to validate by this schema using its name. + */ + name: string; + /** + * Validated properties. + */ + properties: { + /** + * Name of the object's property to be validated which holds an array of validation constraints. + */ + [propertyName: string]: { + /** + * Validation type. Should be one of the ValidationTypes value. + */ + type: string; + /** + * Constraints set by validation type. + */ + constraints?: any[]; + /** + * Error message used to be used on validation fail. + * You can use "$value" to use value that was failed by validation. + * You can use "$constraint1" and "$constraint2" keys in the message string, + * and they will be replaced with constraint values if they exist. + * Message can be either string, either a function that returns a string. + * Second option allows to use values and custom messages depend of them. + */ + message?: string | ((value?: any, constraint1?: any, constraint2?: any) => string); + /** + * Specifies if validated value is an array and each of its item must be validated. + */ + each?: boolean; + /** + * Indicates if validation must be performed always, no matter of validation groups used. + */ + always?: boolean; + /** + * Validation groups used for this validation. + */ + groups?: string[]; + /** + * Specific validation type options. + */ + options?: any; + }[]; + }; +} diff --git a/src/node_modules/class-validator/types/validation-schema/ValidationSchemaToMetadataTransformer.d.ts b/src/node_modules/class-validator/types/validation-schema/ValidationSchemaToMetadataTransformer.d.ts new file mode 100644 index 0000000..6d59751 --- /dev/null +++ b/src/node_modules/class-validator/types/validation-schema/ValidationSchemaToMetadataTransformer.d.ts @@ -0,0 +1,8 @@ +import { ValidationSchema } from "./ValidationSchema"; +import { ValidationMetadata } from "../metadata/ValidationMetadata"; +/** + * Used to transform validation schemas to validation metadatas. + */ +export declare class ValidationSchemaToMetadataTransformer { + transform(schema: ValidationSchema): ValidationMetadata[]; +} diff --git a/src/node_modules/class-validator/types/validation/ValidationArguments.d.ts b/src/node_modules/class-validator/types/validation/ValidationArguments.d.ts new file mode 100644 index 0000000..4e5e576 --- /dev/null +++ b/src/node_modules/class-validator/types/validation/ValidationArguments.d.ts @@ -0,0 +1,26 @@ +/** + * Arguments being sent to message builders - user can create message either by simply returning a string, + * either by returning a function that accepts MessageArguments and returns a message string built based on these arguments. + */ +export interface ValidationArguments { + /** + * Validating value. + */ + value: any; + /** + * Constraints set by this validation type. + */ + constraints: any[]; + /** + * Name of the target that is being validated. + */ + targetName: string; + /** + * Object that is being validated. + */ + object: Object; + /** + * Name of the object's property being validated. + */ + property: string; +} diff --git a/src/node_modules/class-validator/types/validation/ValidationError.d.ts b/src/node_modules/class-validator/types/validation/ValidationError.d.ts new file mode 100644 index 0000000..3ebaea5 --- /dev/null +++ b/src/node_modules/class-validator/types/validation/ValidationError.d.ts @@ -0,0 +1,41 @@ +/** + * Validation error description. + */ +export declare class ValidationError { + /** + * Object that was validated. + * + * OPTIONAL - configurable via the ValidatorOptions.validationError.target option + */ + target?: Object; + /** + * Object's property that haven't pass validation. + */ + property: string; + /** + * Value that haven't pass a validation. + * + * OPTIONAL - configurable via the ValidatorOptions.validationError.value option + */ + value?: any; + /** + * Constraints that failed validation with error messages. + */ + constraints?: { + [type: string]: string; + }; + /** + * Contains all nested validation errors of the property. + */ + children: ValidationError[]; + contexts?: { + [type: string]: any; + }; + /** + * + * @param shouldDecorate decorate the message with ANSI formatter escape codes for better readability + * @param hasParent true when the error is a child of an another one + * @param parentPath path as string to the parent of this property + */ + toString(shouldDecorate?: boolean, hasParent?: boolean, parentPath?: string): string; +} diff --git a/src/node_modules/class-validator/types/validation/ValidationExecutor.d.ts b/src/node_modules/class-validator/types/validation/ValidationExecutor.d.ts new file mode 100644 index 0000000..4cbe1a6 --- /dev/null +++ b/src/node_modules/class-validator/types/validation/ValidationExecutor.d.ts @@ -0,0 +1,28 @@ +import { Validator } from "./Validator"; +import { ValidationError } from "./ValidationError"; +import { ValidationMetadata } from "../metadata/ValidationMetadata"; +import { ValidatorOptions } from "./ValidatorOptions"; +/** + * Executes validation over given object. + */ +export declare class ValidationExecutor { + private validator; + private validatorOptions?; + awaitingPromises: Promise[]; + ignoreAsyncValidations: boolean; + private metadataStorage; + constructor(validator: Validator, validatorOptions?: ValidatorOptions); + execute(object: Object, targetSchema: string, validationErrors: ValidationError[]): void; + whitelist(object: any, groupedMetadatas: { + [propertyName: string]: ValidationMetadata[]; + }, validationErrors: ValidationError[]): void; + stripEmptyErrors(errors: ValidationError[]): ValidationError[]; + private performValidations; + private generateValidationError; + private conditionalValidations; + private customValidations; + private nestedValidations; + private mapContexts; + private createValidationError; + private getConstraintType; +} diff --git a/src/node_modules/class-validator/types/validation/ValidationTypes.d.ts b/src/node_modules/class-validator/types/validation/ValidationTypes.d.ts new file mode 100644 index 0000000..ac6bcaa --- /dev/null +++ b/src/node_modules/class-validator/types/validation/ValidationTypes.d.ts @@ -0,0 +1,15 @@ +/** + * Validation types. + */ +export declare class ValidationTypes { + static CUSTOM_VALIDATION: string; + static NESTED_VALIDATION: string; + static PROMISE_VALIDATION: string; + static CONDITIONAL_VALIDATION: string; + static WHITELIST: string; + static IS_DEFINED: string; + /** + * Checks if validation type is valid. + */ + static isValid(type: string): boolean; +} diff --git a/src/node_modules/class-validator/types/validation/ValidationUtils.d.ts b/src/node_modules/class-validator/types/validation/ValidationUtils.d.ts new file mode 100644 index 0000000..dba1ab8 --- /dev/null +++ b/src/node_modules/class-validator/types/validation/ValidationUtils.d.ts @@ -0,0 +1,4 @@ +import { ValidationArguments } from "./ValidationArguments"; +export declare class ValidationUtils { + static replaceMessageSpecialTokens(message: string | ((args: ValidationArguments) => string), validationArguments: ValidationArguments): string; +} diff --git a/src/node_modules/class-validator/types/validation/Validator.d.ts b/src/node_modules/class-validator/types/validation/Validator.d.ts new file mode 100644 index 0000000..802a439 --- /dev/null +++ b/src/node_modules/class-validator/types/validation/Validator.d.ts @@ -0,0 +1,37 @@ +import { ValidationError } from "./ValidationError"; +import { ValidatorOptions } from "./ValidatorOptions"; +/** + * Validator performs validation of the given object based on its metadata. + */ +export declare class Validator { + /** + * Performs validation of the given object based on decorators or validation schema. + * Common method for `validateOrReject` and `validate` methods. + */ + private coreValidate; + /** + * Performs validation of the given object based on decorators used in given object class. + */ + validate(object: Object, options?: ValidatorOptions): Promise; + /** + * Performs validation of the given object based on validation schema. + */ + validate(schemaName: string, object: Object, options?: ValidatorOptions): Promise; + /** + * Performs validation of the given object based on decorators used in given object class and reject on error. + */ + validateOrReject(object: Object, options?: ValidatorOptions): Promise; + /** + * Performs validation of the given object based on validation schema and reject on error. + */ + validateOrReject(schemaName: string, object: Object, options?: ValidatorOptions): Promise; + /** + * Performs validation of the given object based on decorators used in given object class. + * NOTE: This method completely ignores all async validations. + */ + validateSync(object: Object, options?: ValidatorOptions): ValidationError[]; + /** + * Performs validation of the given object based on validation schema. + */ + validateSync(schemaName: string, object: Object, options?: ValidatorOptions): ValidationError[]; +} diff --git a/src/node_modules/class-validator/types/validation/ValidatorConstraintInterface.d.ts b/src/node_modules/class-validator/types/validation/ValidatorConstraintInterface.d.ts new file mode 100644 index 0000000..9948853 --- /dev/null +++ b/src/node_modules/class-validator/types/validation/ValidatorConstraintInterface.d.ts @@ -0,0 +1,14 @@ +import { ValidationArguments } from "./ValidationArguments"; +/** + * Custom validators must implement this interface to provide custom validation logic. + */ +export interface ValidatorConstraintInterface { + /** + * Method to be called to perform custom validation over given value. + */ + validate(value: any, validationArguments?: ValidationArguments): Promise | boolean; + /** + * Gets default message when validation for this constraint fail. + */ + defaultMessage?(validationArguments?: ValidationArguments): string; +} diff --git a/src/node_modules/class-validator/types/validation/ValidatorOptions.d.ts b/src/node_modules/class-validator/types/validation/ValidatorOptions.d.ts new file mode 100644 index 0000000..ec2eac5 --- /dev/null +++ b/src/node_modules/class-validator/types/validation/ValidatorOptions.d.ts @@ -0,0 +1,53 @@ +/** + * Options passed to validator during validation. + */ +export interface ValidatorOptions { + /** + * If set to true then validator will skip validation of all properties that are undefined in the validating object. + */ + skipUndefinedProperties?: boolean; + /** + * If set to true then validator will skip validation of all properties that are null in the validating object. + */ + skipNullProperties?: boolean; + /** + * If set to true then validator will skip validation of all properties that are null or undefined in the validating object. + */ + skipMissingProperties?: boolean; + /** + * If set to true validator will strip validated object of any properties that do not have any decorators. + * + * Tip: if no other decorator is suitable for your property use @Allow decorator. + */ + whitelist?: boolean; + /** + * If set to true, instead of stripping non-whitelisted properties validator will throw an error + */ + forbidNonWhitelisted?: boolean; + /** + * Groups to be used during validation of the object. + */ + groups?: string[]; + /** + * If set to true, the validation will not use default messages. + * Error message always will be undefined if its not explicitly set. + */ + dismissDefaultMessages?: boolean; + /** + * ValidationError special options. + */ + validationError?: { + /** + * Indicates if target should be exposed in ValidationError. + */ + target?: boolean; + /** + * Indicates if validated value should be exposed in ValidationError. + */ + value?: boolean; + }; + /** + * Settings true will cause fail validation of unknown objects. + */ + forbidUnknownValues?: boolean; +} -- cgit