SB-6.1-PRE
This commit is contained in:
1 parent
690169a409
commit
358a25f522
3760 files changed
+300059
-36
No files matched your search
+3197
File diff suppressed because it is too large.
Load diff
+1
@@ -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/arLine truncated
|
||||
+2
@@ -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?"[1m":"",r=t?"[22m":"",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)),Line truncated
|
||||
//# sourceMappingURL=index.esm.min.js.map
|
||||
+1
@@ -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/decoratoLine truncated
|
||||
+3582
File diff suppressed because it is too large.
Load diff
+1
@@ -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/arLine truncated
|
||||
+2
@@ -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<e.length)||t.groups&&!!t.groups.find(function(t){return-1!==e.indexOf(t)}))}),a=this.validationMetadatas.filter(function(t){return"string"!=typeof t.target&&t.target!==n&&(!(t.target instanceof Function)||n.prototype instanceof t.target)&&(!!t.always||!(e&&0<e.length)||t.groups&&!!t.groups.find(function(t){return-1!==e.indexOf(t)}))}).filter(function(n){return!t.find(function(t){return t.propertyName===n.propertyName&&t.type===n.type})});return t.concat(a)},c.prototype.getTargetValidatorConstraints=function(n){return this.constraintMetadatas.filter(function(t){return t.target===n})},c);function c(){this.validationMetadatas=[],this.constraintMetadatas=[]}var l=(f.prototype.toString=function(n,t,r){var e=this;function a(t){return" - property "+i+r+t+o+" has failed the following constraints: "+i+Object.keys(e.constraints).join(", ")+o+" \n"}void 0===n&&(n=!1),void 0===t&&(t=!1),void 0===r&&(r="");var i=n?"[1m":"",o=n?"[22m":"";if(t){var s=Number.isInteger(+this.property)?"["+this.property+"]":(r?".":"")+this.property;return this.constraints?a(s):this.children.map(function(t){return t.toString(n,!0,r+s)}).join("")}return"An instance of "+i+(this.target?this.target.constructor.name:"an object")+o+" has failed the validation:\n"+(this.constraints?a(this.property):"")+this.children.map(function(t){return t.toString(n,!0,e.property)}).join("")},f);function f(){}var d=(p.isValid=function(t){var n=this;return"isValid"!==t&&"getMessage"!==t&&-1!==Object.keys(this).map(function(t){return n[t]}).indexOf(t)},p.CUSTOM_VALIDATION="customValidation",p.NESTED_VALIDATION="nestedValidation",p.PROMISE_VALIDATION="promiseValidation",p.CONDITIONAL_VALIDATION="conditionalValidation",p.WHITELIST="whitelistValidation",p.IS_DEFINED="isDefined",p);function p(){}var v=(m.replaceMessageSpecialTokens=function(t,n){var r;return t instanceof Function?r=t(n):"string"==typeof t&&(r=t),r&&n.constraints instanceof Array&&n.constraints.forEach(function(t,n){r=r.replace(new RegExp("\\$constraint"+(n+1),"g"),t)}),r&&void 0!==n.value&&null!==n.value&&"string"==typeof n.value&&(r=r.replace(/\$value/g,n.value)),r=(r=r&&r.replace(/\$property/g,n.property))&&r.replace(/\$target/g,n.targetName)},m);function m(){}function g(t){return null!==t&&"object"==typeof t&&"function"==typeof t.then}var y=(I.prototype.execute=function(a,t,i){var o=this;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 n=this.validatorOptions?this.validatorOptions.groups:void 0,r=this.metadataStorage.getTargetValidationMetadatas(a.constructor,t,n),s=this.metadataStorage.groupByPropertyName(r);if(this.validatorOptions&&this.validatorOptioLine truncated
|
||||
//# sourceMappingURL=index.umd.min.js.map
|
||||
+1
@@ -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/cLine truncated
|
||||
Reference in new issue
Block a user