I am having two select box Month,Year (for expire date).I want to validate both box Combinedly.I need both fields required but one message Like “Please select your Expire date”.
In http://bassistance.de/ jquery validation plugin
jQuery("#payment_frm").validate({
rules: {
exp_month:{
required: true
},
exp_year:{
required: true
}
},
messages: {
exp_month: "Please select expire month",
exp_year: "Please select expire year"
}
});
Thanks in advance
What you need is the ‘groups’ option – see below – and a grouped error placement. Not quite sure about the ‘messages’ bit, haven’t tried to tie custom errors back to a group yet. If it doesn’t work, just set both messages the same and call it good.