Your code incorrectly wraps .validate()
inside a click
handler...
$('#btn').click(function() {
$("#form1").validate({
...
});
});
This is wrong because .validate()
is only the initialization method of the plugin, so there is no reason to wrap it inside a click
handler. The click
of the submit button is already automatically captured and handled by the plugin.
This is the proper way to use the .validate()
method...
$(document).ready(function() {
$("#form1").validate({ // initialize the plugin
// rules & options
});
});
Working DEMO using jQuery 1.10.2 and jQuery Validate 1.11.1, tested with IE 81: http://jsfiddle.net/jsDzU/show
1 Tested with a real version of IE 8 installed in Windows XP SP3. Never assume that "IE 8 Mode" in another IE version is an accurate representation of the real thing or an "emulator" - it is not. Microsoft provides free VPC hard drive images for accurate testing in each IE version.