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
<input type="text"
[class.is-invalid]="name.invalid && (name.dirty || name.touched) && name.errors.minlength" minlength="5"
required
name="name"
#name="ngModel"
[(ngModel)]="account.name"
placeholder="Enter your Account name"
class="form-control">
in the above code, i am able to add is-invalid class but in the else condition, I also want to add is-valid class. Any suggestions ?