@aaronburt/is-postal
v1.0.1
Published
Postal code validation for multiple countries.
Downloads
7
Readme
@aaronburt/isPostal
This package provides postal code validation for multiple countries.
Installation
To install this package, you can use npm:
npm install @aaronburt/isPostal
import Postal from '@aaronburt/isPostal';
const usPostalCode = '12345';
const isUSPostal = Postal.isUSPostalCode(usPostalCode);
console.log(`Is US Postal Code valid? ${isUSPostal}`); // Output: Is US Postal Code valid? true
Supported Countries and Validation Methods
- United States: isUSPostalCode
- Canada: isCanadaPostalCode
- United Kingdom: isUKPostalCode
- Australia: isAustraliaPostalCode
- Germany: isGermanyPostalCode
- Japan: isJapanPostalCode
- France: isFrancePostalCode
- Spain: isSpainPostalCode
- Italy: isItalyPostalCode
- India: isIndiaPostalCode