我有复选框的输入型在我的形式,我想使用jQuery验证:http://docs.jquery.com/Plugins/Validation使用jQuery验证检查选中的复选框
我有十几种其他形式的矿井做工精细,但没有这些表单有复选框。我如何检查以确保使用此插件检查复选框?
目前,我有它这样的:当我尝试来验证它
...
termsConditions: {
required: true
}
...
<input type="checkbox" id="termsConditions" name="termsConditions"/> I agree to the <a href="terms">terms and conditions</a>
<label style="float: none;" for="termsConditions" class="error" generated="true"></label>
什么也没有发生。任何帮助?
这也是同样的问题。 – AKor 2011-04-07 21:47:00
jsFiddle示例适用于Chrome 10上的我。 – 2011-04-07 21:49:48
@Sennheiser使用''required''或添加类''required''应该可以工作,如果不是请发布更多的html和'.validate()'选项来查看是否其他事情正在引发问题。 – 2011-04-07 21:50:11