dhl-packstation-validator
v0.1.3
Published
A package for validating DHL Packstation addresses
Downloads
100
Readme
DHL Packstation validator
This package has been created to validate DHL packstation addresses and implements the DHL standards as defined per DHL barcode standards version 3.1.
Dependencies / Compatibility
- ES2015 import/export syntax is being used. The package comes with a
.babelrc
with atransform-es2015-modules-commonjs
pluin definition. - String.padStart is being used. Please make sure you have the necessary polyfills if you want to support browsers which do not provide
String.padStart
.
Installation
The package is hosted on npm. You can install it via npm or yarn:
npm i --save dhl-packstation-validator
Usage
Postnummer Validation
To validate a postnummer string, you can call the static method Postnummer.isValid(postnummer)
. It will validate
the given postnummer based on it's format and the check digit and return the result as boolean
.