The validator sets the
maxlength error key if the
ngModel.$viewValue is longer than the integer obtained by evaluating the AngularJS expression given in the
ngMaxlength attribute value.
maxlengthattribute is used, with two differences:
ngMaxlengthdoes not set the
maxlengthattribute and therefore HTML5 constraint validation is not available.
ngMaxlengthattribute must be an expression, while the
maxlengthvalue must be interpolated.
<ANY ng-maxlength="expression"> ... </ANY>
|ngMaxlength|| || |
AngularJS expression that must evaluate to a
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.