International zipcodes validator based on Regex for Node.js and the browser.
npm install i18n-zipcodesInternational zipcodes validator in Javascript, based on Regex for Node.js and the browser.
sh
$ npm install i18n-zipcodes
`$3
* Download the script in the dist folder
Usage
`js
i18nZipcodes(countryCode: string, zipCode: string): boolean
// countryCode param is case insensitive
`$3
`js
// CommonJS Syntax
const i18nZipcodes = require('i18n-zipcodes');
// or ES Syntax
import i18nZipcodes from 'i18n-zipcodes';i18nZipcodes('US', '90210'); // true
i18nZipcodes('fr', '5632'); // false
`$3
`html
`
115 Countries supported
Country codes use the ISO 3166-1 format.$3
- ๐ฆ๐ฉ (AD) Andorra
- ๐ฆ๐ฒ (AM) Armenia
- ๐ฆ๐ท (AR) Argentina
- ๐ฆ๐ธ (AS) American Samoa
- ๐ฆ๐น (AT) Austria
- ๐ฆ๐บ (AU) Australia
- ๐ฆ๐ฟ (AZ) Azerbaijan$3
- ๐ง๐ฆ (BA) Bosnia and Herzegovina
- ๐ง๐ฉ (BD) Bangladesh
- ๐ง๐ช (BE) Belgium
- ๐ง๐ฌ (BG) Bulgaria
- ๐ง๐ฏ (BJ) Benin
- ๐ง๐ฒ (BM) Bermuda
- ๐ง๐ณ (BN) Brunei
- ๐ง๐ท (BR) Brazil
- ๐ง๐พ (BY) Belarus$3
- ๐จ๐ฆ (CA) Canada
- ๐จ๐ญ (CH) Switzerland
- ๐จ๐ณ (CN) China
- ๐จ๐บ (CU) Cuba
- ๐จ๐ฝ (CX) Christmas Island
- ๐จ๐พ (CY) Cyprus
- ๐จ๐ฟ (CZ) Czechia$3
- ๐ฉ๐ช (DE) Germany
- ๐ฉ๐ฐ (DK) Denmark
- ๐ฉ๐ฟ (DZ) Algeria$3
- ๐ช๐ช (EE) Estonia
- ๐ช๐ธ (ES) Spain$3
- ๐ซ๐ฎ (FI) Finland
- ๐ซ๐ฒ (FM) Micronesia
- ๐ซ๐ด (FO) Faroe Islands
- ๐ซ๐ท (FR) France$3
- ๐ฌ๐ช (GE) Georgia
- ๐ฌ๐ซ (GF) French Guiana
- ๐ฌ๐ฑ (GL) Greenland
- ๐ฌ๐ต (GP) Guadeloupe
- ๐ฌ๐ท (GR) Greece
- ๐ฌ๐น (GT) Guatemala
- ๐ฌ๐บ (GU) Guam
- ๐ฌ๐ผ (GW) Guinea-Bissau$3
- ๐ญ๐ท (HR) Croatia
- ๐ญ๐บ (HU) Hungary$3
- ๐ฎ๐จ (IC) Canary Islands
- ๐ฎ๐ฉ (ID) Indonesia
- ๐ฎ๐ช (IE) Ireland
- ๐ฎ๐ฑ (IL) Israel
- ๐ฎ๐ณ (IN) Inde
- ๐ฎ๐ธ (IS) Iceland
- ๐ฎ๐น (IT) Italy$3
- ๐ฏ๐ต (JP) Japan$3
- ๐ฐ๐ช (KE) Kenya
- ๐ฐ๐ฌ (KG) Kyrgyzstan
- ๐ฐ๐ท (KR) South Korea
- ๐ฐ๐ผ (KW) Kuwait
- ๐ฐ๐ฟ (KZ) Kazakhstan$3
- ๐ฑ๐ฎ (LI) Liechtenstein
- ๐ฑ๐น (LT) Lithuania
- ๐ฑ๐บ (LU) Luxembourg
- ๐ฑ๐ป (LV) Latvia$3
- ๐ฒ๐ฆ (MA) Morocco
- ๐ฒ๐ฉ (MD) Moldova
- ๐ฒ๐ช (ME) Montenegro
- ๐ฒ๐ฌ (MG) Madagascar
- ๐ฒ๐ญ (MH) Marshall Islands
- ๐ฒ๐ฐ (MK) North Macedonia
- ๐ฒ๐ฒ (MM) Myanmar
- ๐ฒ๐ณ (MN) Mongolia
- ๐ฒ๐ต (MP) Northern Mariana Islands
- ๐ฒ๐ถ (MQ) Martinique
- ๐ฒ๐น (MT) Malta
- ๐ฒ๐ป (MV) Maldives
- ๐ฒ๐ฝ (MX) Mexico
- ๐ฒ๐พ (MY) Malaysia
- ๐ฒ๐ฟ (MZ) Mozambique$3
- ๐ณ๐ฑ (NL) Netherlands
- ๐ณ๐ด (NO) Norway
- ๐ณ๐ฟ (NZ) New Zealand$3
- ๐ต๐ญ (PH) Philippines
- ๐ต๐ฐ (PK) Pakistan
- ๐ต๐ฑ (PL) Poland
- ๐ซ๐ท (PM) Saint Pierre and Miquelon
- ๐ต๐ท (PR) Puerto Rico
- ๐ต๐ธ (PS) Palestine
- ๐ต๐น (PT) Portugal
- ๐ต๐ผ (PW) Palau$3
- ๐ท๐ช (RE) Rรฉunion
- ๐ท๐ด (RO) Romania
- ๐ท๐ธ (RS) Serbia
- ๐ท๐บ (RU) Russian Federation$3
- ๐ธ๐ฆ (SA) Saudi Arabia
- ๐ธ๐ฉ (SD) Sudan
- ๐ธ๐ช (SE) Sweden
- ๐ธ๐ฌ (SG) Singapore
- ๐ธ๐ฎ (SI) Slovenia
- ๐ธ๐ฐ (SK) Slovakia
- ๐ธ๐ฒ (SM) San Marino
- ๐ธ๐ฟ (SZ) Swaziland$3
- ๐น๐ญ (TH) Thailand
- ๐น๐ฏ (TJ) Tajikistan
- ๐น๐ฒ (TM) Turkmenistan
- ๐น๐ณ (TN) Tunisia
- ๐น๐ท (TR) Turkey
- ๐น๐ผ (TW) Taiwan$3
- ๐บ๐ฆ (UA) Ukraine
- ๐ฌ๐ง (UK) United Kingdom
- ๐บ๐ธ (US) United States of America
- ๐บ๐พ (UY) Uruguay
- ๐บ๐ฟ (UZ) Uzbekistan$3
- ๐ป๐ช (VE) Venezuela
- ๐ป๐ฎ (VI) Virgin Islands (U.S.)
- ๐ป๐ณ (VN) Viet Nam$3
- ๐ฝ๐ฐ (XK) Kosovo$3
- (YU) Yugoslavia$3
- ๐ฟ๐ฆ (ZA) South Africa
- ๐ฟ๐ฒ (ZM`) Zambia