浏览代码

#226: Fix the conflict issue with MooTools

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

+ 1 - 0
CHANGELOG.md

@@ -9,6 +9,7 @@
 * The [```zipCode``` validator](http://bootstrapvalidator.com/validators/zipCode/) adds support for Italian, Dutch postcodes
 * [#245](https://github.com/nghuuphuoc/bootstrapvalidator/pull/245): The [```cvv``` validator](http://bootstrapvalidator.com/validators/cvv/) should support spaces in credit card, thanks to [@evilchili](https://github.com/evilchili)
 * 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
 * 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)

+ 2 - 1
dist/js/bootstrapValidator.js

@@ -404,7 +404,8 @@
          */
         _isExcluded: function($field) {
             if (this.options.excluded) {
-                for (var i in this.options.excluded) {
+                var length = this.options.excluded.length;
+                for (var i = 0; i < length; i++) {
                     if (('string' == typeof this.options.excluded[i] && $field.is(this.options.excluded[i]))
                         || ('function' == typeof this.options.excluded[i] && this.options.excluded[i].call(this, $field, this) == true))
                     {

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


+ 2 - 1
src/js/bootstrapValidator.js

@@ -403,7 +403,8 @@
          */
         _isExcluded: function($field) {
             if (this.options.excluded) {
-                for (var i in this.options.excluded) {
+                var length = this.options.excluded.length;
+                for (var i = 0; i < length; i++) {
                     if (('string' == typeof this.options.excluded[i] && $field.is(this.options.excluded[i]))
                         || ('function' == typeof this.options.excluded[i] && this.options.excluded[i].call(this, $field, this) == true))
                     {