I am using jquery 开发者_开发问答validator plugin to validate a form on my website. I have got a birthdate field for which I want to perform validation that birthdate should be chosen and a custom error message should be displayed. For birthdate I have got three dropdown lists of day, month and year for which I want to display a single error message. Like if I don't choose a month or year the error will be displayed. It will be only gone if all the three values are selected. How can I do this? The error message can be " Please select a birthdate". Below is a code for validating a single dropdown element. I want mutiple validation to be performed. {
$(document).ready(function(){
$("#register").validate({
rules: {
day:"required"
}
message: {
day:"Please select birthdate"
}
});
});}
精彩评论