Comparing version 4.0.1 to 4.0.2
# Changelog | ||
## 4.0.2 (2012/07/11) | ||
* Replace "then" with correct "than" in all error messages. (Identified by stefanw) | ||
## 4.0.1 (2012/05/09) | ||
@@ -4,0 +8,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a> | ||
* @version 1.7 | ||
* @version 1.7.1 | ||
* @see http://github.com/garycourt/JSV | ||
@@ -343,3 +343,3 @@ */ | ||
if (typeof minimum === "number" && (instance.getValue() < minimum || (minimumCanEqual === false && instance.getValue() === minimum))) { | ||
report.addError(instance, schema, "minimum", "Number is less then the required minimum value", minimum); | ||
report.addError(instance, schema, "minimum", "Number is less than the required minimum value", minimum); | ||
} | ||
@@ -366,3 +366,3 @@ } | ||
if (typeof maximum === "number" && (instance.getValue() > maximum || (maximumCanEqual === false && instance.getValue() === maximum))) { | ||
report.addError(instance, schema, "maximum", "Number is greater then the required maximum value", maximum); | ||
report.addError(instance, schema, "maximum", "Number is greater than the required maximum value", maximum); | ||
} | ||
@@ -422,3 +422,3 @@ } | ||
if (typeof minItems === "number" && instance.getProperties().length < minItems) { | ||
report.addError(instance, schema, "minItems", "The number of items is less then the required minimum", minItems); | ||
report.addError(instance, schema, "minItems", "The number of items is less than the required minimum", minItems); | ||
} | ||
@@ -445,3 +445,3 @@ } | ||
if (typeof maxItems === "number" && instance.getProperties().length > maxItems) { | ||
report.addError(instance, schema, "maxItems", "The number of items is greater then the required maximum", maxItems); | ||
report.addError(instance, schema, "maxItems", "The number of items is greater than the required maximum", maxItems); | ||
} | ||
@@ -495,3 +495,3 @@ } | ||
if (typeof minLength === "number" && instance.getValue().length < minLength) { | ||
report.addError(instance, schema, "minLength", "String is less then the required minimum length", minLength); | ||
report.addError(instance, schema, "minLength", "String is less than the required minimum length", minLength); | ||
} | ||
@@ -517,3 +517,3 @@ } | ||
if (typeof maxLength === "number" && instance.getValue().length > maxLength) { | ||
report.addError(instance, schema, "maxLength", "String is greater then the required maximum length", maxLength); | ||
report.addError(instance, schema, "maxLength", "String is greater than the required maximum length", maxLength); | ||
} | ||
@@ -614,3 +614,3 @@ } | ||
if (decimals && decimals.length > maxDecimal) { | ||
report.addError(instance, schema, "maxDecimal", "The number of decimal places is greater then the allowed maximum", maxDecimal); | ||
report.addError(instance, schema, "maxDecimal", "The number of decimal places is greater than the allowed maximum", maxDecimal); | ||
} | ||
@@ -617,0 +617,0 @@ } |
@@ -6,3 +6,3 @@ /** | ||
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a> | ||
* @version 1.7 | ||
* @version 1.7.1 | ||
* @see http://github.com/garycourt/JSV | ||
@@ -343,3 +343,3 @@ */ | ||
if (typeof minimum === "number" && (instance.getValue() < minimum || (minimumCanEqual === false && instance.getValue() === minimum))) { | ||
report.addError(instance, schema, "minimum", "Number is less then the required minimum value", minimum); | ||
report.addError(instance, schema, "minimum", "Number is less than the required minimum value", minimum); | ||
} | ||
@@ -366,3 +366,3 @@ } | ||
if (typeof maximum === "number" && (instance.getValue() > maximum || (maximumCanEqual === false && instance.getValue() === maximum))) { | ||
report.addError(instance, schema, "maximum", "Number is greater then the required maximum value", maximum); | ||
report.addError(instance, schema, "maximum", "Number is greater than the required maximum value", maximum); | ||
} | ||
@@ -422,3 +422,3 @@ } | ||
if (typeof minItems === "number" && instance.getProperties().length < minItems) { | ||
report.addError(instance, schema, "minItems", "The number of items is less then the required minimum", minItems); | ||
report.addError(instance, schema, "minItems", "The number of items is less than the required minimum", minItems); | ||
} | ||
@@ -445,3 +445,3 @@ } | ||
if (typeof maxItems === "number" && instance.getProperties().length > maxItems) { | ||
report.addError(instance, schema, "maxItems", "The number of items is greater then the required maximum", maxItems); | ||
report.addError(instance, schema, "maxItems", "The number of items is greater than the required maximum", maxItems); | ||
} | ||
@@ -519,3 +519,3 @@ } | ||
if (typeof minLength === "number" && instance.getValue().length < minLength) { | ||
report.addError(instance, schema, "minLength", "String is less then the required minimum length", minLength); | ||
report.addError(instance, schema, "minLength", "String is less than the required minimum length", minLength); | ||
} | ||
@@ -541,3 +541,3 @@ } | ||
if (typeof maxLength === "number" && instance.getValue().length > maxLength) { | ||
report.addError(instance, schema, "maxLength", "String is greater then the required maximum length", maxLength); | ||
report.addError(instance, schema, "maxLength", "String is greater than the required maximum length", maxLength); | ||
} | ||
@@ -544,0 +544,0 @@ } |
@@ -6,3 +6,3 @@ /** | ||
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a> | ||
* @version 1.5 | ||
* @version 1.5.1 | ||
* @see http://github.com/garycourt/JSV | ||
@@ -369,3 +369,3 @@ */ | ||
if (typeof minimum === "number" && (instance.getValue() < minimum || (minimumCanEqual === false && instance.getValue() === minimum))) { | ||
report.addError(instance, schema, "minimum", "Number is less then the required minimum value", minimum); | ||
report.addError(instance, schema, "minimum", "Number is less than the required minimum value", minimum); | ||
} | ||
@@ -392,3 +392,3 @@ } | ||
if (typeof maximum === "number" && (instance.getValue() > maximum || (maximumCanEqual === false && instance.getValue() === maximum))) { | ||
report.addError(instance, schema, "maximum", "Number is greater then the required maximum value", maximum); | ||
report.addError(instance, schema, "maximum", "Number is greater than the required maximum value", maximum); | ||
} | ||
@@ -448,3 +448,3 @@ } | ||
if (typeof minItems === "number" && instance.getProperties().length < minItems) { | ||
report.addError(instance, schema, "minItems", "The number of items is less then the required minimum", minItems); | ||
report.addError(instance, schema, "minItems", "The number of items is less than the required minimum", minItems); | ||
} | ||
@@ -471,3 +471,3 @@ } | ||
if (typeof maxItems === "number" && instance.getProperties().length > maxItems) { | ||
report.addError(instance, schema, "maxItems", "The number of items is greater then the required maximum", maxItems); | ||
report.addError(instance, schema, "maxItems", "The number of items is greater than the required maximum", maxItems); | ||
} | ||
@@ -521,3 +521,3 @@ } | ||
if (typeof minLength === "number" && instance.getValue().length < minLength) { | ||
report.addError(instance, schema, "minLength", "String is less then the required minimum length", minLength); | ||
report.addError(instance, schema, "minLength", "String is less than the required minimum length", minLength); | ||
} | ||
@@ -543,3 +543,3 @@ } | ||
if (typeof maxLength === "number" && instance.getValue().length > maxLength) { | ||
report.addError(instance, schema, "maxLength", "String is greater then the required maximum length", maxLength); | ||
report.addError(instance, schema, "maxLength", "String is greater than the required maximum length", maxLength); | ||
} | ||
@@ -640,3 +640,3 @@ } | ||
if (decimals && decimals.length > maxDecimal) { | ||
report.addError(instance, schema, "maxDecimal", "The number of decimal places is greater then the allowed maximum", maxDecimal); | ||
report.addError(instance, schema, "maxDecimal", "The number of decimal places is greater than the allowed maximum", maxDecimal); | ||
} | ||
@@ -1391,3 +1391,3 @@ } | ||
if (typeof minimum === "number" && (instance.getValue() < minimum || (exclusiveMinimum === true && instance.getValue() === minimum))) { | ||
report.addError(instance, schema, "minimum", "Number is less then the required minimum value", minimum); | ||
report.addError(instance, schema, "minimum", "Number is less than the required minimum value", minimum); | ||
} | ||
@@ -1405,3 +1405,3 @@ } | ||
if (typeof maximum === "number" && (instance.getValue() > maximum || (exclusiveMaximum === true && instance.getValue() === maximum))) { | ||
report.addError(instance, schema, "maximum", "Number is greater then the required maximum value", maximum); | ||
report.addError(instance, schema, "maximum", "Number is greater than the required maximum value", maximum); | ||
} | ||
@@ -1548,3 +1548,3 @@ } | ||
//Hack, but WAY faster then instantiating a new schema | ||
//Hack, but WAY faster than instantiating a new schema | ||
ENVIRONMENT._schemas["http://json-schema.org/schema#"] = SCHEMA_03; | ||
@@ -1551,0 +1551,0 @@ ENVIRONMENT._schemas["http://json-schema.org/hyper-schema#"] = HYPERSCHEMA_03; |
@@ -6,3 +6,3 @@ /** | ||
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a> | ||
* @version 4.0.1 | ||
* @version 4.0.2 | ||
* @see http://github.com/garycourt/JSV | ||
@@ -9,0 +9,0 @@ */ |
{ | ||
"name" : "JSV", | ||
"version" : "4.0.1", | ||
"version" : "4.0.2", | ||
"description" : "A JavaScript implementation of a extendable, fully compliant JSON Schema validator.", | ||
@@ -5,0 +5,0 @@ "homepage" : "http://github.com/garycourt/JSV", |
2098988