Antoine Brisebois-Roy
Antoine Brisebois-Roy

Reputation: 109

Pass custom message to mat-error custom directive

I've use a solution in another thread to display error messages. However, there are cases where I put a string message in the mat-error tags and I would like, in those case, to display this message if it is not null.

I've been trying to fetch the inner text for the mat-error in the updateErrors but without success.

I would like to have this to give a flexibility for developers to use a custom message if they want for certain fields, but use the generics one for things like required, max, etc.

Upvotes: 0

Views: 26

Answers (0)

Related Questions