1
我正在使用formwizard插件,我无法获得复选框数组来验证。我在页面上有其他元素的工作,但不能得到这一个(更不用说这是我需要的2个复选框数组之一)。必须选择一个或多个项目。我已经把这个页面切成了我希望对这个问题至关重要的部分。jquery复选框数组验证w/formwizard
<input type="checkbox" name="status_checkbox[]" id="status_professional" value="status_professional">
<script type="text/javascript">
$(function(){
$("#infoForm").formwizard({
formPluginEnabled: true,
validationEnabled: true,
validationOptions : {
rules: {
status_checkbox: {
//required: "input[name='status_checkbox[]']",
required: "input[name='status_checkbox:checked']",
minlength: 1
},
},
messages: {
status_checkbox: {
required: "Status field is required."
},
}
},
focusFirstInput : true,
});
});
</script>
有3项不同的复选框。不知道为什么只有一个出现。其他人在'id'和'value'属性中有所不同,同时具有相同的'姓名'。 – eflat 2010-12-06 17:18:01