Browse Source

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

nghuuphuoc 11 years ago
parent
commit
94cc42d422
1 changed files with 5 additions and 0 deletions
  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) {
             //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