ok the following code works fine if i put the checkbox room field without [] but if i do like this
$(function() {
// Setup form validation on the #register-form element
$("#reservation").validate({
// Specify the validation rules
rules: {
room[]: "required",
start: "required",
end: "required",
name: "required",
phone: "required",
email: {
required: true,
email: true
},
address: "required"
},
// Specify the validation error messages
messages: {
room[]: " Select one room",
start: "Select Check In date in Room Availability",
end: "Select Check Out date in Room Availability",
name: "Enter your full name",
phone: "Phone number is required",
email: "Please enter a valid email address",
address: "Address is required"
},
submitHandler: function(form) {
form.submit();
}
});
});
then the room field with room[] is not throwing any error to select one room.