title: How to add class if the validation pass in angular
body: <p>I am very new to Angular and trying to learn. I am stuck here in form_validation. I am able to add a class when there is an error in that field but I am not getting if suppose there is no error then I need to add another class. This is what I have wrote</p>
  <pre><code>&lt;input type=&quot;text&quot; 
  [class.is-invalid]=&quot;name.invalid &amp;&amp; (name.dirty || name.touched) &amp;&amp; name.errors.minlength&quot; minlength=&quot;5&quot; 
  required 
  name=&quot;name&quot; 
  #name=&quot;ngModel&quot; 
  [(ngModel)]=&quot;account.name&quot; 
  placeholder=&quot;Enter your Account name&quot; 
  class=&quot;form-control&quot;&gt;
  </code></pre>
  <p>in the above code, i am able to add <code>is-invalid</code> class but in the else condition, I also want to add <code>is-valid</code> class. Any suggestions ?</p>