I have two radio buttons on a form - one to select payment by card,
another to select an alternate method.
I'm using Jorn's validation plugin to validate the credit card fields
but ONLY IF the credit card radio is ticked:
"CCType": { required: $("#paycredit").is(":checked") }
However, this isn't working quite right - the button is checked by
default when the page loads. I uncheck it, and it STILL executes the
validation. If, on the other hand, I load the page with the ALTERNATE
button ticked, the validation proceeds as expected and doesn't validate
the credit card fields.
I'm a version or two behind on the plugin but I wondered what the
correct fix for this was? I'm thinking I might have the syntax wrong.....
Regards,
Michael Price