Michael Price schrieb:

Hi all,
Hoping (and betting) that this is a simple fix but I have two fields - the month and year of a card expiry date. Both of them need to have a selection made, but I only want to show ONE error message if EITHER of them are left blank.

At the moment, if both fields are left blank, two error messages appear underneath the boxes. Is there a way to tie both fields together so only one message is displayed?
Currently the best approach is a custom method that checks both fields, but is added only to one of them. If you have two fields side-by-side its good for message display to add the rule to the right one.

As that question now came up a few times I've added (http://dev.jquery.com/changeset/4648) an example to the dynamic-totals-demo: http://dev.jquery.com/view/trunk/plugins/validate/demo/dynamic-totals.html Its not perfect yet, focusing the invalid field needs to know which field is acutally invalid.

Let me know if that works for you

Jörn

Reply via email to