浏览代码

#301: Add example showing how to enable the submit button all the time

nghuuphuoc 11 年之前
父节点
当前提交
530389218f
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      demo/event.html

+ 3 - 0
demo/event.html

@@ -309,6 +309,9 @@ $(document).ready(function() {
             var $form = $(e.target);
             // I don't want to add has-success class to valid field container
             $field.parents('.form-group').removeClass('has-success');
+
+            // I want to enable the submit button all the time
+            $form.data('bootstrapValidator').disableSubmitButtons(false);
         });
 
     // Validate the form manually