Skip to content

A fast minimal package to validate Rwandan National Ids and phone numbers using Regular Expressions.

License

Notifications You must be signed in to change notification settings

knowbee/rwa-validator

Repository files navigation

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

About

A fast minimal package to validate Rwandan National Ids and phone numbers using Regular Expressions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published