title: Angular 8 Email validation throws exception
body: <p>I implemented the email validation through the tutorials. The problem is Email validation accepts something like "asd@asd" which is not a valid mail.</p>
  
  <p>Secondly i get the error "ngModel cannot be used to register form controls with a parent formGroup directive.  Try using
        formGroup's partner directive "formControlName" instead. "
  tried all the answers on stackoverflow but none of them worked.
  What am i doing wrong ?</p>
  
  <pre><code>  this.loginForm = this.formBuilder.group({
            email: ['', [Validators.required, Validators.email,
  Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$')]],
          });
  </code></pre>
  
  <p>And the template : </p>
  
  <pre><code> &lt;input class="form-control" formControlName="email" type="text"[(ngModel)]="username" name="username" placeholder="E-mail"
                 [ngClass]="{ 'is-invalid': submitted &amp;&amp; f.email.errors }" /&gt;
          &lt;div *ngIf="submitted &amp;&amp; f.email.errors" class="invalid-feedback"&gt;
            &lt;div *ngIf="f.email.errors.required"&gt;Email is required&lt;/div&gt;
            &lt;div *ngIf="f.email.errors.email"&gt;Email must be a valid email address&lt;/div&gt;
          &lt;/div&gt;
  </code></pre>