The AngularJS ng-maxlength directive is used to add the maxlength validator to ngModel. It can be used with text-based input controls, but can also be applied to custom text-based controls.
Syntax