Browse Source

#253: Fix the IBAN validator issue on IE8

nghuuphuoc 11 years ago
parent
commit
41bc06e424
4 changed files with 15 additions and 12 deletions
  1. 1 0
      CHANGELOG.md
  2. 6 5
      dist/js/bootstrapValidator.js
  3. 2 2
      dist/js/bootstrapValidator.min.js
  4. 6 5
      src/js/validator/iban.js

+ 1 - 0
CHANGELOG.md

@@ -14,6 +14,7 @@
 * Change default ```submitButtons``` to ```[type="submit"]``` to support ```input type="submit"```
 * [#226](https://github.com/nghuuphuoc/bootstrapvalidator/issues/226): Fix the conflict issue with MooTools
 * [#238](https://github.com/nghuuphuoc/bootstrapvalidator/issues/238): The submit buttons are not sent
+* [#253](https://github.com/nghuuphuoc/bootstrapvalidator/issues/253): The [```iban``` validator](http://bootstrapvalidator.com/validators/iban/) does not work on IE8
 * Fix the issue that the hidden fields generated by other plugins might not be validated
 * When parsing options from HTML attributes, don't add the field which hasn't validators. It improves fixes for [#191](https://github.com/nghuuphuoc/bootstrapvalidator/issues/191), [#223](https://github.com/nghuuphuoc/bootstrapvalidator/issues/223)
 

+ 6 - 5
dist/js/bootstrapValidator.js

@@ -1872,13 +1872,14 @@
             }
 
             value = value.substr(4) + value.substr(0, 4);
-            value = value.split('').map(function(n) {
+            value = $.map(value.split(''), function(n) {
                 var code = n.charCodeAt(0);
                 return (code >= 'A'.charCodeAt(0) && code <= 'Z'.charCodeAt(0))
-                    // Replace A, B, C, ..., Z with 10, 11, ..., 35
-                    ? (code - 'A'.charCodeAt(0) + 10)
-                    : n;
-            }).join('');
+                        // Replace A, B, C, ..., Z with 10, 11, ..., 35
+                        ? (code - 'A'.charCodeAt(0) + 10)
+                        : n;
+            });
+            value = value.join('');
 
             var temp   = parseInt(value.substr(0, 1), 10),
                 length = value.length;

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


+ 6 - 5
src/js/validator/iban.js

@@ -117,13 +117,14 @@
             }
 
             value = value.substr(4) + value.substr(0, 4);
-            value = value.split('').map(function(n) {
+            value = $.map(value.split(''), function(n) {
                 var code = n.charCodeAt(0);
                 return (code >= 'A'.charCodeAt(0) && code <= 'Z'.charCodeAt(0))
-                    // Replace A, B, C, ..., Z with 10, 11, ..., 35
-                    ? (code - 'A'.charCodeAt(0) + 10)
-                    : n;
-            }).join('');
+                        // Replace A, B, C, ..., Z with 10, 11, ..., 35
+                        ? (code - 'A'.charCodeAt(0) + 10)
+                        : n;
+            });
+            value = value.join('');
 
             var temp   = parseInt(value.substr(0, 1), 10),
                 length = value.length;