Browse Source

Update zipCode.js

Added the letters 'W' and 'Z' in the second and third letter list for Canada postal code.
jzhang6 11 years ago
parent
commit
d063041817
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/js/validator/zipCode.js

+ 1 - 1
src/js/validator/zipCode.js

@@ -32,7 +32,7 @@
 
             var country = (options.country || 'US').toUpperCase();
             switch (country) {
-                case 'CA': return /^(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}\s?[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}$/i.test(value);
+                case 'CA': return /^(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|X|Y){1}[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}\s?[0-9]{1}(?:A|B|C|E|G|H|J|K|L|M|N|P|R|S|T|V|W|X|Y|Z){1}[0-9]{1}$/i.test(value);
                 case 'DK': return /^(DK(-|\s)?)?\d{4}$/i.test(value);
                 case 'GB': return this._gb(value);