title: Angular 2 - Custom validator always returns true, even when condition is false
body: <p>I've written a custom validator for email addresses that looks like this:</p>
  
  <pre><code>function emailValidator(control: FormControl): { [s: string]: boolean } {
      if (!control.value.match(/^[a-z0-9!#$%&amp;'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i)) {
        console.log('invalid');
        return {invalidEmail: true};
      }else{
        console.log('valid');
        return {invalidEmail: false};
      }
  }
  </code></pre>
  
  <p>I'm using the validator to display a error message on my page with the following html:</p>
  
  <pre><code>   &lt;div class="formError" *ngIf="myForm.controls['email'].hasError('invalidEmail')"&gt;
           &lt;p&gt;
              &lt;i class="fa fa-exclamation-triangle"&gt;&lt;/i&gt; Enter your email address.
          &lt;/p&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>My FormGroup looks like this:</p>
  
  <pre><code>this.myForm = fb.group({
    'content' : ['',Validators.minLength(10)],
    'email' : ['',Validators.compose([Validators.required,emailValidator])],
    'name' : ['',Validators.required],
    'captcha' : ['',this.captchaValidator(this.captchaA,this.captchaB)]
  });
  </code></pre>
  
  <p>When I enter a invalid email address the error message is displaying as it should do. When i enter a valid email address the message is also showing. When a valid email address is entered the string "valid" is logged in my console which means that my emailValidator returns false and this should make the error message disappear. Any thought about what might be the problem?</p>