Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 6 files changed
  • 0 commit comments
  • 2 contributors
Commits on Jul 10, 2012
@stefanw stefanw Replace in all comparisons "then" with correct "than" 2412c62
Commits on Jul 11, 2012
@garycourt Incremented version number to 4.0.2:
* Replace "then" with correct "than" in all error messages. (Identified by stefanw)
e539d4d
View
4 CHANGELOG.md
@@ -1,5 +1,9 @@
# 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)
* Fixed bug with extended schemas that contain a "pattern" attribute. (Identified by DrDyne)
View
16 lib/json-schema-draft-01.js
@@ -3,7 +3,7 @@
*
* @fileOverview Implementation of the first revision of the JSON Schema specification draft.
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
- * @version 1.7
+ * @version 1.7.1
* @see http://github.com/garycourt/JSV
*/
@@ -339,7 +339,7 @@
minimum = schema.getAttribute("minimum");
minimumCanEqual = schema.getAttribute("minimumCanEqual");
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);
}
}
}
@@ -361,7 +361,7 @@
maximum = schema.getAttribute("maximum");
maximumCanEqual = schema.getAttribute("maximumCanEqual");
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);
}
}
}
@@ -416,7 +416,7 @@
if (instance.getType() === "array") {
minItems = schema.getAttribute("minItems");
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);
}
}
}
@@ -438,7 +438,7 @@
if (instance.getType() === "array") {
maxItems = schema.getAttribute("maxItems");
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);
}
}
}
@@ -487,7 +487,7 @@
if (instance.getType() === "string") {
minLength = schema.getAttribute("minLength");
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);
}
}
}
@@ -508,7 +508,7 @@
if (instance.getType() === "string") {
maxLength = schema.getAttribute("maxLength");
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);
}
}
}
@@ -604,7 +604,7 @@
if (typeof maxDecimal === "number") {
decimals = instance.getValue().toString(10).split('.')[1];
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);
}
}
}
View
14 lib/json-schema-draft-02.js
@@ -3,7 +3,7 @@
*
* @fileOverview Implementation of the second revision of the JSON Schema specification draft.
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
- * @version 1.7
+ * @version 1.7.1
* @see http://github.com/garycourt/JSV
*/
@@ -339,7 +339,7 @@
minimum = schema.getAttribute("minimum");
minimumCanEqual = schema.getAttribute("minimumCanEqual");
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);
}
}
}
@@ -361,7 +361,7 @@
maximum = schema.getAttribute("maximum");
maximumCanEqual = schema.getAttribute("maximumCanEqual");
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);
}
}
}
@@ -416,7 +416,7 @@
if (instance.getType() === "array") {
minItems = schema.getAttribute("minItems");
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);
}
}
}
@@ -438,7 +438,7 @@
if (instance.getType() === "array") {
maxItems = schema.getAttribute("maxItems");
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);
}
}
}
@@ -511,7 +511,7 @@
if (instance.getType() === "string") {
minLength = schema.getAttribute("minLength");
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);
}
}
}
@@ -532,7 +532,7 @@
if (instance.getType() === "string") {
maxLength = schema.getAttribute("maxLength");
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);
}
}
}
View
22 lib/json-schema-draft-03.js
@@ -3,7 +3,7 @@
*
* @fileOverview Implementation of the third revision of the JSON Schema specification draft.
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
- * @version 1.5
+ * @version 1.5.1
* @see http://github.com/garycourt/JSV
*/
@@ -365,7 +365,7 @@
minimum = schema.getAttribute("minimum");
minimumCanEqual = schema.getAttribute("minimumCanEqual");
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);
}
}
}
@@ -387,7 +387,7 @@
maximum = schema.getAttribute("maximum");
maximumCanEqual = schema.getAttribute("maximumCanEqual");
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);
}
}
}
@@ -442,7 +442,7 @@
if (instance.getType() === "array") {
minItems = schema.getAttribute("minItems");
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);
}
}
}
@@ -464,7 +464,7 @@
if (instance.getType() === "array") {
maxItems = schema.getAttribute("maxItems");
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);
}
}
}
@@ -513,7 +513,7 @@
if (instance.getType() === "string") {
minLength = schema.getAttribute("minLength");
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);
}
}
}
@@ -534,7 +534,7 @@
if (instance.getType() === "string") {
maxLength = schema.getAttribute("maxLength");
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);
}
}
}
@@ -630,7 +630,7 @@
if (typeof maxDecimal === "number") {
decimals = instance.getValue().toString(10).split('.')[1];
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);
}
}
}
@@ -1380,7 +1380,7 @@
minimum = schema.getAttribute("minimum");
exclusiveMinimum = schema.getAttribute("exclusiveMinimum") || (!instance.getEnvironment().getOption("strict") && !schema.getAttribute("minimumCanEqual"));
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);
}
}
}
@@ -1393,7 +1393,7 @@
maximum = schema.getAttribute("maximum");
exclusiveMaximum = schema.getAttribute("exclusiveMaximum") || (!instance.getEnvironment().getOption("strict") && !schema.getAttribute("maximumCanEqual"));
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);
}
}
}
@@ -1535,7 +1535,7 @@
//Latest JSON Schema
//
- //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;
ENVIRONMENT._schemas["http://json-schema.org/hyper-schema#"] = HYPERSCHEMA_03;
ENVIRONMENT._schemas["http://json-schema.org/links#"] = LINKS_03;
View
2  lib/jsv.js
@@ -3,7 +3,7 @@
*
* @fileOverview A JavaScript implementation of a extendable, fully compliant JSON Schema validator.
* @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
*/
View
2  package.json
@@ -1,6 +1,6 @@
{
"name" : "JSV",
- "version" : "4.0.1",
+ "version" : "4.0.2",
"description" : "A JavaScript implementation of a extendable, fully compliant JSON Schema validator.",
"homepage" : "http://github.com/garycourt/JSV",
"author" : "Gary Court <gary.court@gmail.com>",

No commit comments for this range

Something went wrong with that request. Please try again.