views:

42

answers:

0

Here is the problem i have, i have 3 select lists. Basically its a date to choose like DAY MONTH YEAR and i need to validate 3 of them but with one error message meaning each one of them must be selected or will give an error message. I have it working but i come up with 3 error messages for each field which is not what i need.

Here is the code sample:

Inside the rules i specify for each field

...
day: "required",
month: "required",
year: "required",
...

and it will result in 3 error messages if not valid but i need to apply a condition so that one message would always appear if one or another field is not selected and all of them must be selected to validate.

hope i explained well.

Thank you if you could suggest a solution.