title: Validation errors not shown with model driven forms in Angular 4
body: <p>I am using the below code for validation errors but no error message is seen. Can anyone help. I have set the validators in component using Form builder.</p>
  
  <p>When i am using only one form - group it works, but not working with nest form- groups.</p>
  
  <pre><code>import {Component, NgModule} from '@angular/core'
  import {BrowserModule} from '@angular/platform-browser'
  
  import {ReactiveFormsModule, FormsModule, FormGroup, FormBuilder, Validators} from "@angular/forms";
  
  @Component({
    selector: 'my-app',
    template: `
      &lt;div class="login"&gt;
  &lt;form [formGroup]="registerForm" (ngSubmit)="dologin(form.value)"&gt;
   &lt;div class="form-group" formGroupName="user" id ="user"&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="username"&gt;Username&lt;/label&gt;
          &lt;input id="username" type="text" class="form-control" name="username" formControlName="username"&gt;
  
          &lt;div [hidden]="registerForm.controls['username'].valid || registerForm.controls['username'].pristine"
          class="alert alert-danger"&gt; Username is required.&lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="password"&gt;Password&lt;/label&gt;
          &lt;input id="password" type="password" class="form-control" name="password" [formControl]="registerForm.controls['password']"&gt;
          &lt;div [hidden]="registerForm.controls['password'].valid || registerForm.controls['password'].pristine"
          class="alert alert-danger"&gt; Password is required.&lt;/div&gt;
      &lt;/div&gt;
      &lt;button type="button" (click)="logOut([registerForm])"&gt;Check vals&lt;/button&gt;
      &lt;button type="submit" [disabled]="!registerForm.valid" class="btn btn-primary"&gt;Login&lt;/button&gt;
  &lt;/form&gt;
  &lt;/div&gt;
    `,
    providers: [FormBuilder]
  })
  export class App {
    name:string;
    form: FormGroup;
    constructor(private fb: FormBuilder) {
      this.name = 'Angular2'
      this.registerForm=this.fb.group({
          user:this.fb.group({
            username:['',Validators.required]
          }),
          password:['',Validators.required]
      });
    }
  
    logOut(x: any) {
      for(var i = 0; i &lt; x.length; ++i) {
        console.log(x[i]);
      }
    }
  
    dologin(stuff: any) {
      console.log(stuff);
    }
  }
  
  @NgModule({
    imports: [ BrowserModule, ReactiveFormsModule ],
    declarations: [ App ],
    bootstrap: [ App ]
  })
  export class AppModule {}
  </code></pre>