Browse Source

#1026: Requires jQuery 1.9.1 or higher

Phuoc Nguyen 11 years ago
parent
commit
59e8c82653

+ 1 - 0
CHANGELOG.md

@@ -22,6 +22,7 @@ __Improvements__
 * [#1002](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1002): Put tooltip/popover on bottom if there is not enough space on top, thanks to [@jazzzz](https://github.com/jazzzz)
 * [#1015](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1015): The [remote](http://bootstrapvalidator.com/validators/remote/) validator allows to set ```data``` options via HTML attributes, thanks to [@jazzzz](https://github.com/jazzzz)
 * [#1017](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1017): Enable validator when setting ```data-bv-validatorname="data-bv-validatorname"```, thanks to [@jazzzz](https://github.com/jazzzz)
+* [#1026](https://github.com/nghuuphuoc/bootstrapvalidator/issues/1026): Requires jQuery 1.9.1 or higher
 
 __Bug Fixes__
 * [#343](https://github.com/nghuuphuoc/bootstrapvalidator/issues/343), [#481](https://github.com/nghuuphuoc/bootstrapvalidator/issues/481), [#1045](https://github.com/nghuuphuoc/bootstrapvalidator/pull/1045): Fix double submit with defered validators, thanks to [@jazzzz](https://github.com/jazzzz)

+ 1 - 1
dist/css/bootstrapValidator.min.css

@@ -2,7 +2,7 @@
  * BootstrapValidator (http://bootstrapvalidator.com)
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
- * @version     v0.5.3-dev, built on 2014-11-04 8:21:42 AM
+ * @version     v0.5.3-dev, built on 2014-11-05 8:45:46 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT

+ 9 - 2
dist/js/bootstrapValidator.js

@@ -2,16 +2,23 @@
  * BootstrapValidator (http://bootstrapvalidator.com)
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
- * @version     v0.5.3-dev, built on 2014-11-04 8:21:42 AM
+ * @version     v0.5.3-dev, built on 2014-11-05 8:45:46 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
 if (typeof jQuery === 'undefined') {
-    throw new Error('BootstrapValidator\'s JavaScript requires jQuery');
+    throw new Error('BootstrapValidator requires jQuery');
 }
 
 (function($) {
+    var version = $.fn.jquery.split(' ')[0].split('.');
+    if ((+version[0] < 2 && +version[1] < 9) || (+version[0] === 1 && +version[1] === 9 && +version[2] < 1)) {
+        throw new Error('BootstrapValidator requires jQuery version 1.9.1 or higher');
+    }
+}(window.jQuery));
+
+(function($) {
     var BootstrapValidator = function(form, options) {
         this.$form   = $(form);
         this.options = $.extend({}, $.fn.bootstrapValidator.DEFAULT_OPTIONS, options);

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


+ 8 - 1
src/js/bootstrapValidator.js

@@ -8,10 +8,17 @@
  */
 
 if (typeof jQuery === 'undefined') {
-    throw new Error('BootstrapValidator\'s JavaScript requires jQuery');
+    throw new Error('BootstrapValidator requires jQuery');
 }
 
 (function($) {
+    var version = $.fn.jquery.split(' ')[0].split('.');
+    if ((+version[0] < 2 && +version[1] < 9) || (+version[0] === 1 && +version[1] === 9 && +version[2] < 1)) {
+        throw new Error('BootstrapValidator requires jQuery version 1.9.1 or higher');
+    }
+}(window.jQuery));
+
+(function($) {
     var BootstrapValidator = function(form, options) {
         this.$form   = $(form);
         this.options = $.extend({}, $.fn.bootstrapValidator.DEFAULT_OPTIONS, options);