Coder Social home page Coder Social logo

nuban-account-verifier's Introduction

NUBAN ๐Ÿฆ€

Build Status crates.io

This is a lightweight Rust crate for verifying NUBAN numbers for all Nigerian bank accounts as was directed by the CBN.

What does it do?

It checks the validity of a Nigerian bank account number based on the NUBAN guidelines provided by the CBN.

How to use

    use nuban::Nuban;

    fn main() {
        // pass the bank code and account number as arguments
        let nuban = Nuban::new("058", "0739082716").unwrap();
        if let Ok(true) = nuban.is_valid_account() {
            println!("'{}' is a valid account number", nuban.account_number());
        } else {
            println!("'{}' is not a valid account number", nuban.account_number());
        }
    }

Create a NUBAN instance using the conventional new method

    let nuban = Nuban::new("098", "1038489302");

To check validity on a NUBAN instance:

    println!("{}", nuban.is_valid_account().unwrap());

Contributing

  • Create an issue if you spot any bug.
  • Feel free to fork and fix or extend the feature.
  • Run cargo test to ensure all tests are passing.
  • Add tests for your new features if you can.
  • Send in your pull request ๐Ÿ”ฅ๐Ÿ”ฅ

Other

Like this crate? Please star this repo.

You can give me a shoutout on Twitter

nuban-account-verifier's People

Contributors

miraclx avatar timolinn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.