Permalink
Browse files

Improve the readability of the ‘maxLength’ attribute

  • Loading branch information...
1 parent 95ebd82 commit dd0ecb50849de448342ec05bf04c5d1412b45e3a @Baggz committed Mar 14, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/engines/json/attributes/maxLength.js
@@ -2,10 +2,13 @@
* MaxLength
*/
var maxLengthAttribute = function maxLength(property, propertyValue, attributeValue, propertyAttributes, callback) {
+
if (isString(propertyValue) && propertyValue.length > attributeValue) {
this.addError();
}
+
return callback();
+
};
// Export

0 comments on commit dd0ecb5

Please sign in to comment.