title: very basic angular2 form not getting validated
body: <p>I have a very basic form consisting of a input field and a button.  I am trying to use angular2 validators to show an error message when anything other than numbers are entered into the input field and also to disable the submit button when the input field is invalid or empty.  For some reason the error message shows regardless of what gets entered...  Any idea what i'm doing wrong?</p>
  
  <p>my code:</p>
  
  <p>app.component.html:</p>
  
  <pre><code>&lt;div class="row"&gt;
  &lt;div class="col-md-4 col-md-push-4"&gt;
  &lt;form [formGroup]="barcodeForm"  role="form" (ngSubmit)="submitBarcode(barcode)" &gt;
      &lt;div class="form-group"&gt;        
          &lt;input type="number" class="form-control" id="barcode" placeholder="Enter Barcode" [formControl]="barcodeForm.controls['barcode']" [(ngModel)]="barcode" name="barcode" #focusInput&gt;
          &lt;div [hidden]="barcode.valid || barcode.pristine" class="alert alert-danger"&gt;A barcode can only consist of numbers (0-9)...&lt;/div&gt;
      &lt;/div&gt;
      &lt;button class="btn btn-submit btn-block" [disabled]="!(barcode.valid) || barcode.pristine"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>part of app.component.ts:</p>
  
  <pre><code>import { Component, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
  import { FormBuilder, FormGroup, Validators } from '@angular/forms';
  import { RestService } from "./services/rest.service";
  import { ProductModel } from "./models/product.model";
  
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent implements AfterViewInit {
  @ViewChild('focusInput') focusInput: ElementRef;
  barcode: string;
  barcodeForm: FormGroup;
  product: ProductModel;
  
      constructor(fb: FormBuilder, private restService: RestService){
          this.barcodeForm = fb.group({
              'barcode':['', [Validators.required, Validators.pattern("[0-9]+")]]
          });
  
      }
  </code></pre>