0

我在我的 rails 应用程序中使用 jQuery 实时验证进行 twitter 引导程序( https://github.com/ddarren/jQuery-Live-Form-Validation-For-Twitter-Bootstrap )。我想从字段中删除验证特定条件。前任:

if(project=='Fixed'){
 $("#project_price").validate({
     expression: "if(VAL != '') return true; else return false;",
     message: "Price  is required."
  });
}
else{
//Disable validation for price field
}

谁能建议如何删除/禁用 jQuery 实时验证?

4

1 回答 1

0

您是否尝试过使用以下内容覆盖行为:

$("#project_price").validate({
     expression: "return true;",
});

?

于 2014-06-06T08:54:01.253 回答