Browse Source

#232: Validate Estonian Personal Identification Code (isikukood)

nghuuphuoc 11 years ago
parent
commit
05a5fa5185
3 changed files with 31 additions and 3 deletions
  1. 15 1
      dist/js/bootstrapValidator.js
  2. 1 1
      dist/js/bootstrapValidator.min.js
  3. 15 1
      src/js/validator/id.js

+ 15 - 1
dist/js/bootstrapValidator.js

@@ -2179,6 +2179,20 @@
         },
 
         /**
+         * Validate Estonian Personal Identification Code (isikukood)
+         * Examples:
+         * - Valid: 37605030299
+         *
+         * @see http://et.wikipedia.org/wiki/Isikukood
+         * @param {String} value The ID
+         * @returns {Boolean}
+         */
+        _ee: function(value) {
+            // Use the same format as Lithuanian Personal Code
+            return this._lt(value);
+        },
+
+        /**
          * Validate Spanish personal identity code (DNI)
          * Support i) DNI (for Spanish citizens) and ii) NIE (for foreign people)
          *
@@ -2299,7 +2313,7 @@
         },
 
         /**
-         * Validate Lithuania Personal Code (Asmens kodas)
+         * Validate Lithuanian Personal Code (Asmens kodas)
          * Examples:
          * - Valid: 38703181745
          * - Invalid: 38703181746, 78703181745, 38703421745

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


+ 15 - 1
src/js/validator/id.js

@@ -340,6 +340,20 @@
         },
 
         /**
+         * Validate Estonian Personal Identification Code (isikukood)
+         * Examples:
+         * - Valid: 37605030299
+         *
+         * @see http://et.wikipedia.org/wiki/Isikukood
+         * @param {String} value The ID
+         * @returns {Boolean}
+         */
+        _ee: function(value) {
+            // Use the same format as Lithuanian Personal Code
+            return this._lt(value);
+        },
+
+        /**
          * Validate Spanish personal identity code (DNI)
          * Support i) DNI (for Spanish citizens) and ii) NIE (for foreign people)
          *
@@ -460,7 +474,7 @@
         },
 
         /**
-         * Validate Lithuania Personal Code (Asmens kodas)
+         * Validate Lithuanian Personal Code (Asmens kodas)
          * Examples:
          * - Valid: 38703181745
          * - Invalid: 38703181746, 78703181745, 38703421745