As a beginner with ngMessages, I'm curious to know if there is a $valid counterpart for the $error object. In my exploration of the ngMessages documentation in Angular, I have only encountered discussions about the $error object.
<form name="contactForm">
<input ng-class="{'invalid-field': contactForm.nameField.$error, 'valid-field': !contactForm.nameField.$error}" type="text" name="nameField" placeholder="Full name*" required>
<div ng-messages="contactForm.nameField.$error">
<div ng-message="required">Name is required</div>
</div>
</form>
Currently, I am attempting to change the class to 'valid-field' when the $error object evaluates to false. However, this approach seems inappropriate as it causes the input field to appear valid at all times, which is not intended behavior.