我有 6 组单选按钮,彼此独立。我使用 JQuery 验证插件来验证它们(它们都是必需的)。但是,验证仅适用于“满意”组的第一个。我的验证码在这里
jQuery(document).ready(function() {
$("#surveyForm").validate({
rules: {
satisfaction: {
required: true
},
responding: {
required: true
},
listening: {
required: true
},
solution: {
required: true
},
communication: {
required: true
},
professional: {
required: true
}
},
messages:{
satisfaction: {
required: "this"
},
responding: {
required: "is"
},
listening: {
required: "a"
},
solution: {
required: "test"
},
communication: {
required: "to"
},
professional: {
required: "see"
}
}
});
});
有什么建议么?