Browse Source

#864: Coma separator handling in greaterThan, lessThan validators, thanks to @mgibas

Phuoc Nguyen 11 years ago
parent
commit
9502152193

+ 1 - 0
CHANGELOG.md

@@ -10,6 +10,7 @@ __New Features__
 
 __Improvements__
 * [#823](https://github.com/nghuuphuoc/bootstrapvalidator/issues/823): The [hexColor](http://bootstrapvalidator.com/validators/hexColor/) validator only accepts 6 hex character values when using HTML 5 ```type='color'``` attribute
+* [#864](https://github.com/nghuuphuoc/bootstrapvalidator/pull/864): Coma separator handling in [greaterThan](http://bootstrapvalidator.com/validators/greaterThan/), [lessThan](http://bootstrapvalidator.com/validators/lessThan/) validators, thanks to [@mgibas](https://github.com/mgibas)
 * [#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)
 
 __Bug Fixes__

+ 1 - 0
CONTRIBUTORS.md

@@ -65,6 +65,7 @@ I would like to give big thanks to the following contributors:
 * [@MartinDevillers](https://github.com/MartinDevillers)
 * [@mattrick](https://github.com/mattrick)
 * [@mbezhanov](https://github.com/mbezhanov)
+* [@mgibas](https://github.com/mgibas)
 * [@mike1e](https://github.com/mike1e)
 * [@mraiur](https://github.com/mraiur)
 * [@MrC0mm0n](https://github.com/MrC0mm0n)

+ 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-10-21 8:12:33 AM
+ * @version     v0.5.3-dev, built on 2014-10-21 8:23:41 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT

+ 7 - 1
dist/js/bootstrapValidator.js

@@ -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-10-21 8:12:33 AM
+ * @version     v0.5.3-dev, built on 2014-10-21 8:23:41 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
@@ -3157,6 +3157,9 @@ if (typeof jQuery === 'undefined') {
             if (value === '') {
                 return true;
             }
+            if (value.indexOf(',') > -1){
+                value = value.replace(',', '.');
+            }
             if (!$.isNumeric(value)) {
                 return false;
             }
@@ -5411,6 +5414,9 @@ if (typeof jQuery === 'undefined') {
             if (value === '') {
                 return true;
             }
+            if (value.indexOf(',') > -1){
+                value = value.replace(',', '.');
+            }
             if (!$.isNumeric(value)) {
                 return false;
             }

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