Browse Source

Add dist files for Readd hexColor validator

Emil Rømer Christensen 11 years ago
parent
commit
edb98e4c6a

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

@@ -2,7 +2,7 @@
  * BootstrapValidator (http://bootstrapvalidator.com)
  * BootstrapValidator (http://bootstrapvalidator.com)
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
  *
- * @version     v0.5.2-dev, built on 2014-09-18 10:04:11 PM
+ * @version     v0.5.2-dev, built on 2014-09-18 10:04:23 PM
  * @author      https://twitter.com/nghuuphuoc
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
  * @license     MIT

+ 25 - 1
dist/js/bootstrapValidator.js

@@ -2,7 +2,7 @@
  * BootstrapValidator (http://bootstrapvalidator.com)
  * BootstrapValidator (http://bootstrapvalidator.com)
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
  *
- * @version     v0.5.2-dev, built on 2014-09-18 10:04:11 PM
+ * @version     v0.5.2-dev, built on 2014-09-18 10:04:23 PM
  * @author      https://twitter.com/nghuuphuoc
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
  * @license     MIT
@@ -3097,6 +3097,30 @@ if (typeof jQuery === 'undefined') {
     };
     };
 }(window.jQuery));
 }(window.jQuery));
 ;(function($) {
 ;(function($) {
+    $.fn.bootstrapValidator.i18n.hexColor = $.extend($.fn.bootstrapValidator.i18n.hexColor || {}, {
+        'default': 'Please enter a valid hex color'
+    });
+
+    $.fn.bootstrapValidator.validators.hexColor = {
+        enableByHtml5: function($field) {
+            return ('color' === $field.attr('type'));
+        },
+
+        /**
+         * Return true if the input value is a valid hex color
+         *
+         * @param {BootstrapValidator} validator The validator plugin instance
+         * @param {jQuery} $field Field element
+         * @param {Object} options Can consist of the following keys:
+         * - message: The invalid message
+         * @returns {Boolean}
+         */
+        validate: function(validator, $field, options) {
+            return $.fn.bootstrapValidator.validators.color._hexColor(validator, $field, options);
+        }
+    };
+}(window.jQuery));
+;(function($) {
     $.fn.bootstrapValidator.i18n.iban = $.extend($.fn.bootstrapValidator.i18n.iban || {}, {
     $.fn.bootstrapValidator.i18n.iban = $.extend($.fn.bootstrapValidator.i18n.iban || {}, {
         'default': 'Please enter a valid IBAN number',
         'default': 'Please enter a valid IBAN number',
         countryNotSupported: 'The country code %s is not supported',
         countryNotSupported: 'The country code %s is not supported',

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