diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 1b393676cd79..029ff3fda0c5 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -2613,7 +2613,7 @@ var maxlengthDirective = function() { ctrl.$validate(); }); ctrl.$validators.maxlength = function(modelValue, viewValue) { - return ctrl.$isEmpty(modelValue) || viewValue.length <= maxlength; + return ctrl.$isEmpty(modelValue) || maxlength == 0 || viewValue.length <= maxlength; }; } };