title: Angular: mat-error is not working on custom validator
body: <p>I am unable to properly implement mat-error style change when DatePicker end date input is less than the start date input. The button is able to recognize that the input is invalid by disabling itself, but no error style changes happens on 'end_date'.</p>
  <p>Code:</p>
  <pre><code>    &lt;mat-error *ngIf=&quot;userAddressValidations.hasError('validator')&quot;&gt;
        End date must be greater than start date.
      &lt;/mat-error&gt;
  </code></pre>
  <p>My goal is to show this error message when the custom validator detects the error.</p>
  <p>This is my full sample code:</p>
  <p><a href="https://stackblitz.com/edit/angular-mat-form-validation-eg-f1xsfu?file=app%2Finput-error-state-matcher-example.html" rel="nofollow noreferrer">Stackblitz</a></p>