Both mat-error show when only one error appeared.
I\'m trying to make custom validators with mat-error. Both input for email and confirm password are red when each
The email address field shows an error because the error state matcher checks the parent - which is the form - which is in error because the password fields do not match. You need to use different error state matchers for the email field and password fields because the conditions are different - email does not need to be in error if the password fields don't match.