ソースを参照

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

nghuuphuoc 12 年 前
コミット
d42029016e

+ 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
          *

ファイルの差分が大きいため隠しています
+ 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
          *