I am validating a form and when there is any error in the textfield or any form element I am adding error class to that element. Something like
jQuery("#headerSignin_FirstName").addClass('error');
There are like 6-7 fields which need to be validated and once validated I want to reset the error class being append to the form elements.
Though I can manually use removeClass for each field but looking for a more elegant and clear solution to do this.
Instead of manually using
removeClassfor each field, only select element witherrorclass and useremoveClass