如何使用jquery删除验证类?

如何使用jquery删除验证类?,jquery,jquery-validate,Jquery,Jquery Validate,我有一些使用单选按钮定价的选项。 当用户选择没有值的单选按钮时,不得验证我的复选框表单。 这是我的密码: 选项: <input type="radio" name="pricing_option_rect" id="pricing_imp_rect1" checked="checked" value="100">100 <input type="radio" name="pricing_option_rect" id="pricing_imp_rect2" value="200

我有一些使用单选按钮定价的选项。 当用户选择没有值的单选按钮时,不得验证我的复选框表单。 这是我的密码:

选项:

<input type="radio" name="pricing_option_rect" id="pricing_imp_rect1" checked="checked" value="100">100
<input type="radio" name="pricing_option_rect" id="pricing_imp_rect2" value="200">200
<input type="radio" name="pricing_option_rect" id="pricing_imp_rect3" value="300">300
<input type="radio" name="pricing_option_rect" id="pricing_imp_rect4" value="0" />0
100
200
300
0
复选框:

<input type="checkbox" value="check1" name="rectcat[]" class="{validate:{required:true, minlength:1, maxlength:5}}" />One
<input type="checkbox" value="check2" name="rectcat[]" />Two
<input type="checkbox" value="check3" name="rectcat[]" />Three
<input type="checkbox" value="check4" name="rectcat[]" />Four
<input type="checkbox" value="check5" name="rectcat[]" />Five
<input type="checkbox" value="check6" name="rectcat[]" />Six
<input type="checkbox" value="check7" name="rectcat[]" />Seven
<input type="checkbox" value="check8" name="rectcat[]" />Eight
<div class="container">
  <label for="rectcat[]" class="error">
    Please Select a Minimum of ONE and a Maximum of FIVE categories!
  </label>
</div>
1
二
三
四
五
六
七
八
请至少选择一个类别,最多选择五个类别!
您可以更改此设置:

class="{validate:{required:true, minlength:1, maxlength:5}}"
为此:

class="{validate:{required:'#pricing_imp_rect4:unchecked', minlength:1, maxlength:5}}"
required
允许deptency表达式,而不仅仅是true。在这种情况下,仅当未选中
\pricing\u imp\4
时才需要此选项