title: Get validation error list of form control in angular 6
body: <p>I'm using angular 6 with reactive forms. I want to show validation messages dynamically. And I wrote some code like below. But I take this error: <strong>Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays</strong>. How can I take list of errors of input?</p>
  
  <p><strong>.html file</strong></p>
  
  <pre><code>&lt;form [formGroup]="myForm" (ngSubmit)="save()"&gt;
      &lt;input type="text" formControlName="studentName"&gt;
  
      &lt;div *ngFor="let err of myForm.controls.studentName.errors"&gt;
        &lt;div&gt;You entered not valid input&lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>.ts file</strong></p>
  
  <pre><code>this.myForm = this.formBuilder.group({
    studentName: ['', Validators.required, Validators.minLength(3)]
  });
  </code></pre>