Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor improvements to the ‘maxItems’ attribute

  • Loading branch information...
commit 637ed6e900bde9e619414a545e5b6ca9e0c394c9 1 parent 7a1b3b9
@Baggz authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/engines/json/attributes.js
View
6 src/engines/json/attributes.js
@@ -223,7 +223,11 @@ Validation.prototype.attributes = {
*/
maxItems: function maxItemsConstructor() {
return function maxItems(property, propertyValue, attributeValue, propertyAttributes, callback) {
- return (isArray(propertyValue) && propertyValue.length <= attributeValue) ? callback() : callback(true);
+ if (isArray(propertyValue) && propertyValue.length <= attributeValue) {
+ return callback();
+ } else {
+ return callback(true);
+ }
};
},
Please sign in to comment.
Something went wrong with that request. Please try again.