I have a form styled with bootstrap4
and am using ember-cp-validations
to validate it.
<div class="form-group ">
<label for="name" class="cols-sm-2 control-label">Full Name</label>
<div class="cols-sm-10">
<div class="input-group">
<span class="input-group-addon"></span>
</div>
</div>
<div class="form-control-feedback container">
<span></span>
</div>
</div>
Using , I am able to set the class to has-danger
when showNameError
is true, however when it is false, the class remains there and the has-danger
persists.
As you can see, after I fix the error the has-danger
class remains. My question is, can I make it so the class toggles based on whether the input is valid or not.
Aucun commentaire:
Enregistrer un commentaire