title: My form is invalid but my (ngSubmit) is calling the function
body: <p>I have one formGroup and inside i have one submit button:</p>
  <pre><code>&lt;form [formGroup]=&quot;myGroup&quot; (ngSubmit)=&quot;submitForm()&quot;&gt;
     &lt;input type=&quot;text&quot; formControlName=&quot;name&quot;&gt;
     &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>When my component init i call this function to build the form:</p>
  <pre><code>buildForm() {
    this.myGroup = new FormGroup({
      name: new FormControl(null, [Validators.required]),
    });
  }
  </code></pre>
  <p>When i don't fill the input and click in the button, my component is calling the <code>submitForm()</code>.
  I put a <code>console.log(myGroup.valid)</code> and it is <code>false</code>, but still calls the <code>(ngSubmit)</code> event.
  <br>
  I have other components and seems that when the form is invalid, Angular automatically don't call the submit function when the user click in the submit button.
  I don't know if i'm forgetting something to Angular do this automatic check, or i really need to do something like in my submit function, like:</p>
  <pre><code>if(this.myGroup.valid) {}
  </code></pre>