Yes, correct on your analysis. Thanks a lot for the approach here. Alright, so I'm trying to get it working through this syntax above.
So.....if I have: $("#signupForm").validate({ rules: { billingAddress: { required: true minlength: 5 equalTo: put logic here }, ... how can I shove your logic into my equalTo rule syntactically this way? > ("#comparefields").is(":checked"); On Mar 3, 1:34 pm, George <[EMAIL PROTECTED]> wrote: > I may not be sure what you're wanting but something like this may > help: > > ... $("#billingAddress").val() == $("#shippingAddress").val() && $ > ("#comparefields").is(":checked"); > > I presumed you are wanting to compare the billingAddress and > shippingAddress values. > > George > > On Mar 3, 4:13 pm, "[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"); > > > },