rwa-validator

1.0.6 • Public • Published

rwa-validator

Build Status Maintainability npm Dependency Status npm Open Source Love Open Source Love

NPM

A fast minimal package to validate Rwandan National Ids and Phone Numbers(all carriers) using Regular Expressions.

Installation

npm install rwa-validator

or

yarn add rwa-validator

or

Usage

  • Validating Phone Number

    const { isNationalId, isPhoneNumber } = require("rwa-validator");
    
    isPhoneNumber("0788854444"); // true
    isPhoneNumber("0778854444"); // false
  • Validating National ID

    // must be 16 digit numbers
    isNationalId("1199672222000040"); // true
    isNationalId("1201772222000040"); // false

Contribution

License

MIT

Author

Igwaneza Bruce

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.6
    18
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.6
    18
  • 1.0.5
    15
  • 1.0.4
    2
  • 1.0.3
    2

Package Sidebar

Install

npm i rwa-validator

Weekly Downloads

14

Version

1.0.6

License

MIT

Unpacked Size

17.6 kB

Total Files

10

Last publish

Collaborators

  • knowbee