belarus-personal-number-validator
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

NPM Version

Belarus personal number validator

Validator for personal number in passport of Belarus.

Install

npm i belarus-personal-number-validator

Usage

import { validate } from 'belarus-personal-number-validator';

validate('0000000A000PB2'); //=> {valid: true, error: null}
validate('0000000A000PB3'); //=> {valid: false, error: 'Control numbers are not equal'}

Validation errors

  • 'Personal number must be string'
  • 'Personal number must contain 14 symbols'
  • 'Personal number must contain only numbers and uppercase Latin letters'
  • 'Control numbers are not equal'

/belarus-personal-number-validator/

    Package Sidebar

    Install

    npm i belarus-personal-number-validator

    Weekly Downloads

    2

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    4.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • kiritos