Validate incorrectly disables some (not all) validation if a checkbox is checked.

Validate incorrectly disables some (not all) validation if a checkbox is checked.

I have a fairly straightforward form with validation on a number of fields, all of which is working fine.

I have credit card information fields being validated only if a Payment Method radio button is set to 'Visa' or 'Mastercard', and this is also working correctly.

<input name="payment_method" value="visa" type="radio" class="radio payment_method">Visa
<input name="payment_method" value="mastercard" type="radio" class="radio payment_method">Mastercard
<input name="payment_method" value="cheque" type="radio" class="radio payment_method">Cheque

The rules used to enable/disable validation on the credit card fields this all follow this format:

cc_number: {
      required: function(element) {
            return  $("input[#payment_method]:checked").val()=="visa" ||                               $("input[#payment_method]:checked").val()=="mastercard";
}
    },

This all works correctly.

The problem come in when either of two other unrelated checkboxes on the form are checked.

<input type="checkbox" name="agree_member_directory" value="agree_member_directory"> *I agree to have my information listed in a membership directory
<input type="checkbox" name="agree_website" value="agree_website"> *I agree to have my information listed on the website

These input names don't appear anywhere else in the HTML document and they're not validated fields, however if either of them are checked, the conditional credit card validation no longer fires, although the remaining non-conditional validation on the page continues to work as normal.

EDIT: It would appear that if *any* of the radio buttons on the form are selected, the payment information validation is disabled.

I'm at a loss as to explain what's happening. I'm leaning towards input[#payment_method]:checked syntax, and specifically the :checked syntax as potentially causing the issue and I'm not sure if maybe I'm not scoping that correctly, but I'm stuck in the mud on this one at the moment.

Any ideas would be greatly appreciated.