I’m using the code below with the jQuery Validate plug-in, however I’m receiving the following error after clicking outside of one of the fields that should be required when “Canada” is checked. Any ideas?
province: {
depends: function(element) {
return $("input[name='country'][value='ca']").is(':checked')
}
},
$.validator.methods[method] is
undefined [Break On This Error]
eval(function(p,a,c,k,e,d){e=function(…x5b|trigger|x21|x23′.split(‘|’),0,{}))
When you click on the checkbox to check the result, you can add the rules manually.