There is now a planned solution for adding dependency checks to all validation methods. See http://dev.jquery.com/ticket/2456 for more details.
On Mar 3, 11:13 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > How can I compare 2 text fields only if a certain checkbox is > checked? Can you do something like this? > > billingAddress: { > required: true > minlength: 5 > equalTo: "#shippingAddress" && function(element) { > return jQuery("#comparefields").is(":checked"); > > }, > > I'm not sure if this is possible or how to form this correctly. I > assume you'd be able to do this in an equalto along with specifying > which field to compare to.