Browse Source

#492, #493: Fixed Chilean ID (RUT/RUN) finished in 'K' or 'k', thanks to @marceloampuerop6

phuoc 11 years ago
parent
commit
a61bc10f5f

+ 1 - 0
CHANGELOG.md

@@ -78,6 +78,7 @@ __Bug Fixes__
 * [#425](https://github.com/nghuuphuoc/bootstrapvalidator/issues/425): Custom trigger event is ignored by field validators
 * [#447](https://github.com/nghuuphuoc/bootstrapvalidator/pull/447): Skip the ```_isExcluded()``` when initializing the form. This fixes [#269](https://github.com/nghuuphuoc/bootstrapvalidator/issues/269), [#273](https://github.com/nghuuphuoc/bootstrapvalidator/issues/273). Thanks to [@AlaskanShade](https://github.com/AlaskanShade)
 * [#483](https://github.com/nghuuphuoc/bootstrapvalidator/issues/483), [#487](https://github.com/nghuuphuoc/bootstrapvalidator/pull/487): Added the letters 'W' and 'Z' in the second and third letter list for Canada postal code, thanks to [@jzhang6](https://github.com/jzhang6)
+* [#492](https://github.com/nghuuphuoc/bootstrapvalidator/issues/492), [#493](https://github.com/nghuuphuoc/bootstrapvalidator/pull/493): Fixed Chilean ID (RUT/RUN) finished in 'K' or 'k', thanks to [@marceloampuerop6](https://github.com/marceloampuerop6)
 
 __Document__
 * [#259](https://github.com/nghuuphuoc/bootstrapvalidator/issues/259): Typo "Support almost Bootstrap forms", thanks to [@lloydde](https://github.com/lloydde)

+ 1 - 0
CONTRIBUTORS.md

@@ -27,6 +27,7 @@ I would like to give big thanks to the following contributors:
 * [@lloydde](https://github.com/lloydde)
 * [@logemann](https://github.com/logemann)
 * [@manish-in-java](https://github.com/manish-in-java)
+* [@marceloampuerop6](https://github.com/marceloampuerop6)
 * [@MartinDevillers](https://github.com/MartinDevillers)
 * [@mike1e](https://github.com/mike1e)
 * [@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.0-dev, built on 2014-07-12 8:23:47 AM
+ * @version     v0.5.0-dev, built on 2014-07-12 8:31:42 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT

+ 4 - 4
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.0-dev, built on 2014-07-12 8:23:47 AM
+ * @version     v0.5.0-dev, built on 2014-07-12 8:31:42 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
@@ -3300,10 +3300,10 @@
          * @returns {Boolean}
          */
         _cl: function(value) {
-            if (!/^\d{7,8}[-]{0,1}[0-9K]$/.test(value)) {
+            if (!/^\d{7,8}[-]{0,1}[0-9K]$/i.test(value)) {
                 return false;
             }
-            value = value.replace(/\D/g, '');
+            value = value.replace(/\-/g, '');
             while (value.length < 9) {
                 value = '0' + value;
             }
@@ -3318,7 +3318,7 @@
             } else if (sum === 10) {
                 sum = 'K';
             }
-            return sum + '' === value.charAt(8);
+            return sum + '' === value.charAt(8).toUpperCase();
         },
 
         /**

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


+ 1 - 1
dist/js/language/de_DE.js

@@ -241,7 +241,7 @@
             'default': 'Bitte gültige SIRET Nummer eingeben'
         },
         step: {
-            'default': 'Bitte einen gültigen Schritt von %s eingeben',
+            'default': 'Bitte einen gültigen Schritt von %s eingeben'
         },
         stringCase: {
             'default': 'Bitte nur Kleinbuchstaben eingeben',