title: How to access current FormControl from template
body: <p>I am using Angular 8 and Reactive Forms.</p>
  
  <p>Inside my template, I have code that looks like this:</p>
  
  <pre><code>&lt;input type="text" 
  class="form-control" formControlName="name" 
  placeholder="name" 
  [class.is-invalid]="validationError(formControl)" /&gt;
  </code></pre>
  
  <p>The idea is that if validationError is "truthy", a red border is added to the input element. </p>
  
  <p>Having trouble getting a reference to <strong>FormControl</strong> to be passed to the validationError function. Note that I have a lot of arrays in the form, so template references (i.e. #name) may be tricky. Is there a simple way to get a reference to the current form control, specified by formControlName, from the template?</p>