title: Angular form validation disable submit button
body: <p>In my form I check the name and email validation with name </p>
  
  <pre><code>&lt;input matInputrequired 
         minlength="3" 
         placeholder="Name" 
         ngModel   
         name="name" 
         #firstName="ngModel"
         [(ngModel)]="apiResult.name" 
         id="firstName"&gt;
  </code></pre>
  
  <p>And email with </p>
  
  <pre><code>&lt;input matInput 
         placeholder="Email" 
         ngModel name="email" 
         maxlength="100" 
         #email="ngModel" 
         email 
         [(ngModel)]="apiResult.email" 
         id="email"&gt;
  </code></pre>
  
  <p>if the name field is empty and less than 3 characters. email is not required but if user added an email it should in email format. then if these are success only enable the submit button.</p>