Wondering what’s next for npm?Check out our public roadmap! »

    rwa-validator

    1.0.5 • 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

    Install

    npm i rwa-validator

    DownloadsWeekly Downloads

    13

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    17.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar