jquery validation message won't dissappear
Hi Ray, I am using a form in a bootstrap modal and using the following code to make the jquery validation messages disappear if I close the modal:
<script>
$("#myModal").on("hidden.bs.modal", function () {
// put your default event here
document.getElementById("nombres_waerror_errorMsg_wrapper").style.display = 'none',
document.getElementById("celular_waerror_errorMsg_wrapper").style.display = 'none',
document.getElementById("email_waerror_errorMsg_wrapper").style.display = 'none',
document.getElementById("Security_Code_1_waerror_errorMsg_wrapper").style.display = 'none';
});
</script>
The code works well, but when the form is sent and the server validation fails the code won't work in all the fields and when I close the modal the captcha image validation message won't disappear.