class-validator
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -6,3 +6,3 @@ "use strict"; | ||
var ConstraintMetadata_1 = require("../metadata/ConstraintMetadata"); | ||
var index_1 = require("../index"); | ||
var container_1 = require("../container"); | ||
var MetadataStorage_1 = require("../metadata/MetadataStorage"); | ||
@@ -25,3 +25,3 @@ // ------------------------------------------------------------------------- | ||
var metadata = new ConstraintMetadata_1.ConstraintMetadata(target, name, isAsync); | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addConstraintMetadata(metadata); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addConstraintMetadata(metadata); | ||
}; | ||
@@ -40,3 +40,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -56,3 +56,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -73,3 +73,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -92,3 +92,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -109,3 +109,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -126,3 +126,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -142,3 +142,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -158,3 +158,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -175,3 +175,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -192,3 +192,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -207,7 +207,7 @@ } | ||
constraints: [function (object, value) { | ||
return object[propertyName] !== "" && object[propertyName] !== null; | ||
return object[propertyName] !== null && object[propertyName] !== undefined; | ||
}], | ||
validationOptions: validationOptions | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -230,3 +230,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -246,3 +246,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -262,3 +262,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -278,3 +278,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -294,3 +294,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -307,3 +307,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -323,3 +323,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -340,3 +340,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -360,3 +360,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -376,3 +376,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -392,3 +392,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -409,3 +409,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -426,3 +426,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -446,3 +446,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -463,3 +463,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -482,3 +482,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -498,3 +498,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -518,3 +518,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -535,3 +535,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -551,3 +551,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -567,3 +567,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -583,3 +583,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -599,3 +599,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -616,3 +616,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -632,3 +632,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -649,3 +649,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -666,3 +666,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -683,3 +683,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -699,3 +699,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -715,3 +715,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -731,3 +731,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -747,3 +747,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -763,3 +763,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -780,3 +780,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -797,3 +797,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -813,3 +813,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -829,3 +829,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -845,3 +845,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -861,3 +861,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -879,3 +879,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -895,3 +895,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -911,3 +911,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -927,3 +927,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -944,3 +944,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -961,3 +961,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -977,3 +977,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -994,3 +994,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1011,3 +1011,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1028,3 +1028,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1049,3 +1049,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1065,3 +1065,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1085,3 +1085,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1102,3 +1102,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1118,3 +1118,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1135,3 +1135,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1152,3 +1152,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1168,3 +1168,3 @@ } | ||
}; | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage).addValidationMetadata(new ValidationMetadata_1.ValidationMetadata(args)); | ||
}; | ||
@@ -1171,0 +1171,0 @@ } |
@@ -16,2 +16,3 @@ import { ValidationError } from "./validation/ValidationError"; | ||
export * from "./register-decorator"; | ||
export * from "./metadata/MetadataStorage"; | ||
/** | ||
@@ -18,0 +19,0 @@ * Validates given object. |
@@ -18,2 +18,3 @@ "use strict"; | ||
__export(require("./register-decorator")); | ||
__export(require("./metadata/MetadataStorage")); | ||
/** | ||
@@ -20,0 +21,0 @@ * Validates given object by object's decorators or given validation schema. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_1 = require("../index"); | ||
var container_1 = require("../container"); | ||
/** | ||
@@ -25,3 +25,3 @@ * This metadata interface contains information for custom validators. | ||
get: function () { | ||
return index_1.getFromContainer(this.target); | ||
return container_1.getFromContainer(this.target); | ||
}, | ||
@@ -28,0 +28,0 @@ enumerable: true, |
{ | ||
"name": "class-validator", | ||
"private": false, | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"description": "Class-based validation with Typescript / ES6 / ES5 using decorators or validation schemas. Supports both node.js and browser", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
# class-validator | ||
[![Build Status](https://travis-ci.org/pleerock/class-validator.svg?branch=master)](https://travis-ci.org/pleerock/class-validator) | ||
[![codecov](https://codecov.io/gh/pleerock/class-validator/branch/master/graph/badge.svg)](https://codecov.io/gh/pleerock/class-validator) | ||
[![npm version](https://badge.fury.io/js/class-validator.svg)](https://badge.fury.io/js/class-validator) | ||
[![Dependency Status](https://david-dm.org/pleerock/class-validator.svg)](https://david-dm.org/pleerock/class-validator) | ||
[![devDependency Status](https://david-dm.org/pleerock/class-validator/dev-status.svg)](https://david-dm.org/pleerock/class-validator#info=devDependencies) | ||
[![Join the chat at https://gitter.im/pleerock/class-validator](https://badges.gitter.im/pleerock/class-validator.svg)](https://gitter.im/pleerock/class-validator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
@@ -121,3 +118,3 @@ | ||
constraints: { | ||
length: "$property must be shorter than 10 characters" | ||
length: "$property must be longer than 10 characters" | ||
} | ||
@@ -292,3 +289,3 @@ }, { | ||
otherProperty:string; | ||
@ValidateIf(o => o.otherProperty === "value") | ||
@@ -678,3 +675,3 @@ @IsNotEmpty() | ||
| `@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) and if so, ignores all the validators on the property. | | ||
| `@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. | | ||
@@ -681,0 +678,0 @@ | `@NotEquals(comparison: any)` | Checks if value not equal ("!==") comparison. | |
@@ -5,3 +5,3 @@ "use strict"; | ||
var MetadataStorage_1 = require("../metadata/MetadataStorage"); | ||
var index_1 = require("../index"); | ||
var container_1 = require("../container"); | ||
var ValidationTypes_1 = require("./ValidationTypes"); | ||
@@ -27,3 +27,3 @@ var ValidationUtils_1 = require("./ValidationUtils"); | ||
// ------------------------------------------------------------------------- | ||
this.metadataStorage = index_1.getFromContainer(MetadataStorage_1.MetadataStorage); | ||
this.metadataStorage = container_1.getFromContainer(MetadataStorage_1.MetadataStorage); | ||
} | ||
@@ -124,3 +124,3 @@ // ------------------------------------------------------------------------- | ||
metadatas.forEach(function (metadata) { | ||
index_1.getFromContainer(MetadataStorage_1.MetadataStorage) | ||
container_1.getFromContainer(MetadataStorage_1.MetadataStorage) | ||
.getTargetValidatorConstraints(metadata.constraintCls) | ||
@@ -127,0 +127,0 @@ .forEach(function (customConstraintMetadata) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
398349
3913
838