/is-valid-zipcode

Check if a zip/postal code is valid

Primary LanguageJavaScriptMIT LicenseMIT

is-valid-zipcode

⚠️ Package no longer maintained. I recommend using a more well-maintained package, such as postcode-validator.

Build Latest Version Downloads per Month License

Check if a zip/postal code is valid

Install

$ npm install --save is-valid-zipcode

Usage

var isValidZipcode = require('is-valid-zipcode');

isValidZipcode('2000-000', 'PT');
// => true

isValidZipcode('7521785-952-520', 'PT');
//=> false

By default, the country is United States.

License

MIT © Henrique Dias