浏览代码

#300: Only use styling to show the problems by using status.field.bv event

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

+ 5 - 0
demo/event.html

@@ -304,6 +304,11 @@ $(document).ready(function() {
         })
         })
         .on('success.field.bv', function(e, field) {
         .on('success.field.bv', function(e, field) {
             //console.log(field, '-->success');
             //console.log(field, '-->success');
+        })
+        .on('status.field.bv', function(e, field, $field, status) {
+            var $form = $(e.target);
+            // I don't want to add has-success class to valid field container
+            $field.parents('.form-group').removeClass('has-success');
         });
         });
 
 
     // Validate the form manually
     // Validate the form manually