I have three select boxes for populating the DOB. All three are required but I would like to show one message. I have been searching on Google and found several topics about this and all mentioned to use groups which I tried
groups: {
DateOfBirth: "dob_day dob_month dob_year"
},
errorPlacement: function(error, element) {
if (element.attr("name") == "dob_day" || element.attr("name") == "dob_month" || element.attr("name") == "dob_year" ) {
error.insertAfter("#lastname");
} else {
error.insertAfter(element);
}
}
Bur for me the errorPlacement, as in this example, is not an option because I used CSS for creating a custom error message/placement as you can see below:
#registration_form label {
padding: .8rem .6rem;
position: absolute !important;
top: -3rem;
right: 0;
z-index: 10;
-webkit-transition: all 2s ease-out;
transition: all 2s ease-out;
display: none;
background-color:transparent;
background-color:rgba(0,0,0,0.9);
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
color: #FFF;
}
#registration_form label:after {
content: "";
position: absolute;
bottom: -10px;
left: 45%;
border-style: solid;
border-width: 10px 10px 0;
border-color: #000000 transparent;
display: block;
width: 0;
z-index: 10;
}
How should I adjust the given groups example so that there will be just one error message for the three select boxes at the in CSS created location.
Thank you in advance