Browse Source

#135: The integer validator supports HTML 5 type="number" attribute

nghuuphuoc 12 years ago
parent
commit
d42029016e
3 changed files with 9 additions and 1 deletions
  1. 4 0
      dist/js/bootstrapValidator.js
  2. 1 1
      dist/js/bootstrapValidator.min.js
  3. 4 0
      src/js/validator/integer.js

+ 4 - 0
dist/js/bootstrapValidator.js

@@ -1235,6 +1235,10 @@
 }(window.jQuery));
 ;(function($) {
     $.fn.bootstrapValidator.validators.integer = {
+        enableByHtml5: function($field) {
+            return ('number' == $field.attr('type'));
+        },
+
         /**
          * Return true if the input value is an integer
          *

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


+ 4 - 0
src/js/validator/integer.js

@@ -1,5 +1,9 @@
 (function($) {
     $.fn.bootstrapValidator.validators.integer = {
+        enableByHtml5: function($field) {
+            return ('number' == $field.attr('type'));
+        },
+
         /**
          * Return true if the input value is an integer
          *