jquery validation addMethod based on select value
No more problems, define a variable first.
$.validator.addMethod(
"Brazil",
function(value, element) {
var selectedCountry = $('#Country').val();
if ($("#BMFNP").is(":checked") && (selectedCountry==="BRA")) {
return false;
} else return true;
},
"You cannot select BM&F Outside Brazil and reside in Brazil."
);
Kane Leins