AngularJS ng maxlength Directive
AngularJS ng-maxlength Directive
The ng-maxlength directive is used to add a restriction to an input field, and to form a validator. It is not the same as the maxlength attribute in HTML. It will not prevent users from typing more than the restricted number of characters, but the form will be invalid if they do so.
< input type="text" ng-maxlength="number" >< /input >
|number||A number representing the maximum number of characters legal for the input field.|