Permalink
Browse files

The ‘validateItems’ method now composes a path using the ‘joinPath’ m…

…ethod
  • Loading branch information...
1 parent e48b427 commit 9fb4a57cdbd199c5b21650e2f297656af697026b @Baggz committed Mar 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/engines/json/validateItems.js
@@ -32,7 +32,7 @@ Validation.prototype.validateItems = function(instance, schema, path, callback)
if (['object', 'array'].indexOf(schema.items.type) !== -1) {
return each(instance, function(index, propertyValue, callback) {
- var propertyPath = path + '[' + index + ']';
+ var propertyPath = self.joinPath(path, index);
return self.validateSchema(
propertyValue,
@@ -54,7 +54,7 @@ Validation.prototype.validateItems = function(instance, schema, path, callback)
} else {
return each(instance, function(index, propertyValue, callback) {
- var propertyPath = path + '[' + index + ']';
+ var propertyPath = self.joinPath(path, index);
return self.validateProperty(
propertyPath,

0 comments on commit 9fb4a57

Please sign in to comment.