浏览代码

#314: creditCard validator doesn't work on IE 8

nghuuphuoc 11 年之前
父节点
当前提交
f32158fe4e
共有 4 个文件被更改,包括 4 次插入3 次删除
  1. 1 0
      CHANGELOG.md
  2. 1 1
      dist/js/bootstrapValidator.js
  3. 1 1
      dist/js/bootstrapValidator.min.js
  4. 1 1
      src/js/validator/creditCard.js

+ 1 - 0
CHANGELOG.md

@@ -21,6 +21,7 @@
 * [#311](https://github.com/nghuuphuoc/bootstrapvalidator/issues/311): file validation extension is case sensitive
 * [#311](https://github.com/nghuuphuoc/bootstrapvalidator/issues/311): file validation extension is case sensitive
 * [#312](https://github.com/nghuuphuoc/bootstrapvalidator/pull/312): Fix broacast typo in the [```uri``` validator](http://bootstrapvalidator.com/validators/uri/), thanks to [@mrpollo](https://github.com/mrpollo)
 * [#312](https://github.com/nghuuphuoc/bootstrapvalidator/pull/312): Fix broacast typo in the [```uri``` validator](http://bootstrapvalidator.com/validators/uri/), thanks to [@mrpollo](https://github.com/mrpollo)
 * [#313](https://github.com/nghuuphuoc/bootstrapvalidator/issues/313): Fix the [```file``` validator](http://bootstrapvalidator.com/validators/file/) issue on IE 8
 * [#313](https://github.com/nghuuphuoc/bootstrapvalidator/issues/313): Fix the [```file``` validator](http://bootstrapvalidator.com/validators/file/) issue on IE 8
+* [#314](https://github.com/nghuuphuoc/bootstrapvalidator/issues/314): The [```creditCard``` validator](http://bootstrapvalidator.com/validators/creditCard/) doesn't work IE 8
 * [#259](https://github.com/nghuuphuoc/bootstrapvalidator/issues/259): Typo "Support almost Bootstrap forms"
 * [#259](https://github.com/nghuuphuoc/bootstrapvalidator/issues/259): Typo "Support almost Bootstrap forms"
 * [#261](https://github.com/nghuuphuoc/bootstrapvalidator/pull/261): English fix to 'amazing contributors' section, thanks to [@lloydde](https://github.com/lloydde)
 * [#261](https://github.com/nghuuphuoc/bootstrapvalidator/pull/261): English fix to 'amazing contributors' section, thanks to [@lloydde](https://github.com/lloydde)
 * [#278](https://github.com/nghuuphuoc/bootstrapvalidator/pull/278): Update [```choice``` validator](http://bootstrapvalidator.com/validators/choice/) document, thanks to [@MrC0mm0n](https://github.com/MrC0mm0n)
 * [#278](https://github.com/nghuuphuoc/bootstrapvalidator/pull/278): Update [```choice``` validator](http://bootstrapvalidator.com/validators/choice/) document, thanks to [@MrC0mm0n](https://github.com/MrC0mm0n)

+ 1 - 1
dist/js/bootstrapValidator.js

@@ -1497,7 +1497,7 @@
             for (type in cards) {
             for (type in cards) {
                 for (i in cards[type]['prefix']) {
                 for (i in cards[type]['prefix']) {
                     if (value.substr(0, cards[type]['prefix'][i].length) == cards[type]['prefix'][i]    // Check the prefix
                     if (value.substr(0, cards[type]['prefix'][i].length) == cards[type]['prefix'][i]    // Check the prefix
-                        && cards[type]['length'].indexOf(value.length) != -1)                           // and length
+                        && $.inArray(value.length, cards[type]['length']) != -1)                        // and length
                     {
                     {
                         return true;
                         return true;
                     }
                     }

文件差异内容过多而无法显示
+ 1 - 1
dist/js/bootstrapValidator.min.js


+ 1 - 1
src/js/validator/creditCard.js

@@ -86,7 +86,7 @@
             for (type in cards) {
             for (type in cards) {
                 for (i in cards[type]['prefix']) {
                 for (i in cards[type]['prefix']) {
                     if (value.substr(0, cards[type]['prefix'][i].length) == cards[type]['prefix'][i]    // Check the prefix
                     if (value.substr(0, cards[type]['prefix'][i].length) == cards[type]['prefix'][i]    // Check the prefix
-                        && cards[type]['length'].indexOf(value.length) != -1)                           // and length
+                        && $.inArray(value.length, cards[type]['length']) != -1)                        // and length
                     {
                     {
                         return true;
                         return true;
                     }
                     }