is-valid-zipcode
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/is-valid-zipcode package

1.0.3 • Public • Published

is-valid-zipcode

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

Package Sidebar

Install

npm i is-valid-zipcode

Weekly Downloads

444

Version

1.0.3

License

MIT

Last publish

Collaborators

  • hacdias