1.0.6 • Published 3 years ago

rwa-validator v1.0.6

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

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

1.0.6

3 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago