I am using the jQuery Validator. And I'm trying to figure out: How can I un-attach the validator from my form once its submitted?
$(function() {
// Just the rules, etc...
validator = $("#sweepstakesForm").validate({rules: {fname: {required: true,minlength: 2,maxlength: 50},lname: {required: true,minlength: 2,maxlength: 50},email: {email: true,remote: "?c=home&m=jsHook¶m=email&nojson=1",required: true,minlength: 6,maxlength: 120},address: {required: true,minlength: 5,maxlength: 100},state_0: {required: true},state: ); // etc ...
$('#sweepstakesForm').submit() {
}
});
I have tried these to no avail:
validator = null;
$("#sweepstakesForm").unbind('validate');
delete validator;
Try
$('#sweepstakesForm').data('validator', null);
$("#sweepstakesForm").unbind('validate');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With