Bug
Be able to use mat-error with MatChipInput in the same way that we can use mat-hint.
The error message is not visible below the input.
Providing a StackBlitz reproduction is the best way to share your issue.
https://stackblitz.com/edit/angular-ktsffr
Example use case: show <mat-error> when more than 3 chips are in the chip list.
Material 6.0.0
Placing <mat-error> inside <mat-chip-list> just below <input> shows the error message but it not in the correct location (i.e. below the input's line). Please see provided StackBlitz.
This works as intended. Error text only appears when the form field is in an error state. If you look at the documentation, MatChipList has an errorState property which you need to set to true when there is an error.
Here is how to do it:
https://stackblitz.com/edit/angular-matchiplist-with-error-message?file=app/chips-input-example.html
Thank you @CurtisDS!
thank you
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
This works as intended. Error text only appears when the form field is in an error state. If you look at the documentation,
MatChipListhas anerrorStateproperty which you need to set to true when there is an error.Here is how to do it:
https://stackblitz.com/edit/angular-matchiplist-with-error-message?file=app/chips-input-example.html