title: Set Formgroup valid or invalid angular 7
body: <p>I have one form where I need to set the fields to valid or invalid, because I want to edit the user, but the button stay disabled </p>
  
  <p>edit.component</p>
  
  <pre><code>ngOnInit() {
    this.getForm();
    this.getRole();
    console.log(this.formGroup.valid)
  }
  
  getForm() {
   this.formGroup = this.formBuilder.group({
     name: ['', Validators.required],
     label: ['', Validators.required],
    });
  }
  </code></pre>
  
  <p>when I'll go to the page edit I would like abilit the button I need to set invalid the form</p>
  
  <pre><code>&lt;button type="submit" mat-button color="primary" [disabled]="!formGroup.valid"&gt;Alterar&lt;/button&gt;
  </code></pre>
  
  <p>for example</p>
  
  <pre><code>if(user) {
    this.formGroup (invalid)
   } else {
    this.formGroup (valid)
  }  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/p8QBC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/p8QBC.png" alt="enter image description here"></a></p>
  
  <p>this is my page to edit item, but the formgroup is invalid even with the field filled in, why ?</p>