Skip to content

Commit

Permalink
Fixes #425 - added parentheses for the default values of min and max …
Browse files Browse the repository at this point in the history
…length Form Validators
  • Loading branch information
Arian committed Oct 26, 2010
1 parent b2fb7d9 commit decdf89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Forms/Form.Validator.js
Expand Up @@ -345,7 +345,7 @@ Form.Validator.addAllThese([
else return '';
},
test: function(element, props){
if (typeOf(props.minLength) != 'null') return (element.get('value').length >= props.minLength || 0);
if (typeOf(props.minLength) != 'null') return (element.get('value').length >= (props.minLength || 0));
else return true;
}
}],
Expand All @@ -359,7 +359,7 @@ Form.Validator.addAllThese([
},
test: function(element, props){
//if the value is <= than the maxLength value, element passes test
return (element.get('value').length <= props.maxLength || 10000);
return (element.get('value').length <= (props.maxLength || 10000));
}
}],

Expand Down

0 comments on commit decdf89

Please sign in to comment.