phn-validator
v1.0.6
Published
Provides checksum validation for British Columbia Provicinal Health Numbers (PHN)
Downloads
4
Maintainers
Readme
PHN Validator
This package provides a simple validator for British Columbia provincial health numbers. The validation follows the process on page 23 of this document
Installation
Install my-project with npm
npm i phn-validator
Or yarn
yarn add phn-validator
Usage/Examples
import { phnValidator } from 'phn-validator';
phnValidator("123"); // false
phnValidator("0123456789"); // false
phnValidator("apple"); // Error: Input value must be a numeric string
phnValidator(1001); // Error: Input value must be a string
phnValidator("9260784079"); // true