Browse Source

#109: Suffix the event with .bootstrapValidator

nghuuphuoc 12 years ago
parent
commit
536d0f0d25

+ 2 - 2
dist/js/bootstrapValidator.js

@@ -183,7 +183,7 @@
             var that  = this,
                 type  = fields.attr('type'),
                 event = ('radio' == type || 'checkbox' == type || 'SELECT' == fields[0].tagName) ? 'change' : 'keyup';
-            fields.on(event, function() {
+            fields.on(event + '.bootstrapValidator', function() {
                 that.updateStatus($field, that.STATUS_NOT_VALIDATED, null);
             });
         },
@@ -229,7 +229,7 @@
                             var type  = fields.attr('type'),
                                 event = ('radio' == type || 'checkbox' == type || 'SELECT' == fields[0].tagName) ? 'change' : 'keyup';
 
-                            fields.on(event, function() {
+                            fields.on(event + '.bootstrapValidator', function() {
                                 that.validateField(f);
                             });
                         }

File diff suppressed because it is too large
+ 1 - 1
dist/js/bootstrapValidator.min.js


+ 2 - 2
src/js/bootstrapValidator.js

@@ -182,7 +182,7 @@
             var that  = this,
                 type  = fields.attr('type'),
                 event = ('radio' == type || 'checkbox' == type || 'SELECT' == fields[0].tagName) ? 'change' : 'keyup';
-            fields.on(event, function() {
+            fields.on(event + '.bootstrapValidator', function() {
                 that.updateStatus($field, that.STATUS_NOT_VALIDATED, null);
             });
         },
@@ -228,7 +228,7 @@
                             var type  = fields.attr('type'),
                                 event = ('radio' == type || 'checkbox' == type || 'SELECT' == fields[0].tagName) ? 'change' : 'keyup';
 
-                            fields.on(event, function() {
+                            fields.on(event + '.bootstrapValidator', function() {
                                 that.validateField(f);
                             });
                         }