我有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"
}
}
});
});
有什么建议吗?
答案 0 :(得分:1)