title: How to differentiate multiple Validators.pattern
body: <p>I have an input where user needs to type a longitude. I want to be able to display different error message when user types <code>NaN</code> or <code>Not-Precise-Enough</code> value. I'm using <code>FormControl.hasError('ValidatorsName')</code> to get the errors with validation, but it seems like I cannot differentiate those patterns. </p>
  
  <p>Template:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;mat-form-field class="form-field"&gt;
      &lt;input matInput placeholder="Logitude" [formControl]="longitude"&gt;
      &lt;mat-error *ngIf="longitude.hasError('pattern')"&gt;
          Longitude must be &lt;strong&gt;a number&lt;/strong&gt;
      &lt;/mat-error&gt;
      &lt;!-- I want to be able to check patter2 for example --&gt;
      &lt;mat-error *ngIf="longitude.hasError('pattern')"&gt; 
          Longitude must have &lt;strong&gt;a minimum of 5 decimal numbers&lt;/strong&gt;
      &lt;/mat-error&gt;
  &lt;/mat-form-field&gt;
  </code></pre>
  
  <p>And my Angular code:</p>
  
  <pre class="lang-js prettyprint-override"><code>this.longitude = new FormControl(this.attraction.longitude, [
      // is valid number
      Validators.pattern(new RegExp('(\d{1,3})([.|,]{,1})(\d+))','gi')),
      // is precise enough
      Validators.pattern(new RegExp('(\-{0,1})(\d{1,3})([.|,]{1})(\d{5,13})','i'))
  ]);
  </code></pre>
  
  <p>Is there any way to give those patterns an identifier? I'll appreciate any help.</p>