I am trying to set up some validation, so that if the \'Yes\' radio button is checked another control, which is a drop down list needs to be validated to ensure it is not se
As long as the first drop-down list option has a blank value (), the following rule will work:
rules: {
NCBYears: {
required: function(element) {
return $("input:radio[name='PreviousInsurance']:checked").val() == 'yes';
}
}
}
from: http://docs.jquery.com/Plugins/Validation/Methods/required#dependency-expression