Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular material max length validation

Tags:

angular

Is there any attribute available for Min and Max length validation in Angular Material 7.X ? md-maxlength is deprecated in 7.X version and not working. If we use ng-maxlength it wont show the counter text on validation.

Please suggest.

like image 820
YYY Avatar asked Dec 07 '18 07:12

YYY


1 Answers

If you are using any of these Direvtives formControlName,formControl or ngModel, then you can use maxlength to limit the max characters.

Refer official docs - https://material.angular.io/components/input/overview

like image 93
Sunil Singh Avatar answered Sep 28 '22 01:09

Sunil Singh