I am currently using this script to remove my masks on submit:
$(".active_validator").submit(function() {
$('.money_mask').unmask();
$('.num_mask_thou').unmask();
$('.zipcode').unmask();
$('.only_numbers').unmask();
});
What I am realizing is that if an error occurs during submit, lets say a user did not fill out a field, it still removes the masks.
How do I only make it remove the masks on a 'successful' submit verses any submit?