YYY
YYY

Reputation: 3520

Angular material max length validation

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.

Upvotes: 5

Views: 20017

Answers (1)

Sunil
Sunil

Reputation: 11243

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

Upvotes: 6

Related Questions