title: ng2-intl-input doesn't display error when phone number invalid
body: <p>I'm currently trying to implement a validation rule for phone number on the form I'm working on. I'm using the ng2-tel-input library even though my form uses Angular 6. </p>
  
  <p>The issue I got is that I cannot display an error message when the phone number is invalid. </p>
  
  <p>Here is my HTML code for the moment :</p>
  
  <pre><code>&lt;input  class="form-control phoneField" 
                  ng2TelInput 
                  (hasError)="hasError($event)"
                  (intlTelInputObject)="telInputObject($event)"
                  type="text" pattern="^[\s0-9]*$" [required]="emailReq ? false : 
                  !null" [(ngModel)]="phoneReq"
                  name="phone" #phone="ngModel" phoneValidator style="width: 100% 
                  !important"&gt;
  </code></pre>
  
  <p>Typescript code</p>
  
  <pre><code>import * as ngTelInput from 'ng2-tel-input';
  import 'intl-tel-input';
  import 'intl-tel-input/build/js/utils';
  
  export class  phoneValidator {
  @Input('ng2TelInputOptions') ng2TelInputOptions: any;
  @Output('hasError') hasError: EventEmitter&lt;boolean&gt; = new EventEmitter();
  @Output('ng2TelOutput') ng2TelOutput: EventEmitter&lt;any&gt; = new EventEmitter();
  @Output('intlTelInputObject') intlTelInputObject: EventEmitter&lt;any&gt; = new 
  EventEmitter();    ngTelInput: any;
  
  constructor (private el: ElementRef) {}
  @HostListener('blur') onBlur() {
      let isInputValid:boolean = this.isInputValid();
      if (isInputValid) {
          let telOutput = this.ngTelInput.intlTelInput("getNumber");
          this.hasError.emit(isInputValid);
          this.ng2TelOutput.emit(telOutput);
      } else 
      {
          this.hasError.emit(isInputValid);
      }
  }
  
  isInputValid(): boolean {
      return this.ngTelInput.intlTelInput('isValidNumber') ? true : false;
  }
  }
  </code></pre>
  
  <p>I'm new to Angular and don't understand why it's not working. </p>
  
  <p>I tried to see if hasError was working with this :</p>
  
  <pre><code>   hasError(obj) {
          console.log('hasError: ', obj);
      }
  </code></pre>
  
  <p>And it's working perfectly. If I'm putting an invalid phone number it display false and true if the phone number is valid. But the form still act as if there is a valid number even if it's clearly invalid and doesn't display an error message. </p>
  
  <p>I hope I'm being clear and that someone can help me with this issue. </p>