I have a generic jQuery validation call in a global JS file:
$('form').each(function() {
$(this).validate();
});
This way, any forms on the website can enable validation by simply providing metadata. However, now I want to reset the form because I’m doing AJAX submits. On the official website, it says to reset forms by using the created object:
var validator = $('#someForm').validate();
Problem is, with my generic validator setup, I don’t have a reference to the created object. Is there a way I can still retrieve it in my case?
I’m not sure I understand what you mean by reset the forms. Just in case…
You can remove validation like this..