Change It actually looks like this fix was included in version 1.12.0, and you can find the CDN pointers here: http://jqueryvalidation.org/
And for reference:
http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.js http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.min.js http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/additional-methods.js http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/additional-methods.min.js
I found this code below before I found the solution above, so I suggest using the CDN links mentioned above instead of pasting the code below into your JS file.
There is a better fix on GitHub now (scroll to the bottom) that I copied here. This is not my job , and the sfreytag user from GitHub who wrote it is not a sponsor of SO, I just wanted to get it in SO, so other people who find this do not need to dig through streams on GitHub:
jQuery.validator.addMethod("require_from_group", function(value, element, options) { var validator = this; var selector = options[1]; var validOrNot = $(selector, element.form).filter(function() { return validator.elementValue(this); }).length >= options[0]; if(!$(element).data('being_validated')) { var fields = $(selector, element.form); fields.data('being_validated', true); fields.valid(); $(element.form).valid(); fields.data('being_validated', false); } return validOrNot; }, jQuery.format("Please fill at least {0} of these fields."));
I have done some limited testing so far, but it seems to work the way you expected, all the checks (instead of having to do any โrequire_from_groupโ checks as before), so I'm happy with it so far. I just added it after the validator declaration at the top of my JS code:
$.validator.setDefaults({ debug: true, success: "valid" }); jQuery.validator.addMethod("require_from_group", function(value, element, options) { var validator = this; var selector = options[1];