PHPackages                             emyu/nuban - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. emyu/nuban

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

emyu/nuban
==========

A PHP/laravel package for validating and generating nigerian nuban account numbers based CBN guidelines 2021

1.0.0(5y ago)14135[1 issues](https://github.com/emyu01/nuban/issues)PHPPHP ^7.0

Since May 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/emyu01/nuban)[ Packagist](https://packagist.org/packages/emyu/nuban)[ RSS](/packages/emyu-nuban/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

Nigeria Uniform Bank Account Number (NUBAN)
===========================================

[](#nigeria-uniform-bank-account-number-nuban)

This is an easy to use PHP package to help businesses to verify and generate NUBAN numbers for any Nigerian financial institution in accordance with the CBN revised standard 2020.

There are two categories of financial institutions, Deposit Money Banks (DMB) with 3 digit bank code, and Other Financial Institutions (OFI) with 5 digit bank code. The account number to validate must be 10 digits, while serial number for account number generation must be 9 digits.

Installation
------------

[](#installation)

To install this package, using your terminal interface, go to your project directory by running

> 'cd ~/your/project/directory'

To confirm present directory, run

> 'pwd'

Download the package using composer by running

> 'composer require emyu/nuban'

How to use
----------

[](#how-to-use)

There are two use cases for this package. 'Validation' and 'Generation'

### Validation

[](#validation)

Follow these steps to validate an account number.

> Get a valid bank code (DMB or OFI) and an account number you wish to verify belonging to the bank.

> Import the Nuban class using the 'use Emyu/Nuban/Nuban'

> Call the Nuban class with it's static method as 'Nuban::validate($bankCode, $accountNumber)' to validate your account number.

> It returns 'Valid' if account number is correct and belongs to the bank with the code. Returns 'Invalid' otherwise.

```
    use Emyu\Nuban\Nuban;

    class ExampleClass {

        public $bankCode = '011';

        public $accountNumber = '0000014579';

        function exampleFunction($bankCode, $accountNumber){

           // validate a Deposit Money Bank account number
           $status = Nuban::validate($bankCode, $accountNumber);

           // value of $status = 'Valid'
        }
    }
```

### Generation

[](#generation)

Follow these steps to generate an account number.

> Get a valid bank code (DMB or OFI) and a 9 digit serial number you wish to use as an account number.

> Import the Nuban class using the 'use Emyu/Nuban/Nuban'

> Call the Nuban class with it's static method as 'Nuban::generate($bankCode, $serialNumber)' to generate a valid account number.

> It returns valid account number for the bank with the code if bank code is valid. Throws an error message if otherwise.

```
    use Emyu\Nuban\Nuban;

    class ExampleClass {

        public $bankCode = '011';

        public $serialNumber = '000001457';

        function exampleFunction($bankCode, $serialNumber){

           // generate a Deposit Money Bank account number
           $accountNumber = Nuban::generate($bankCode, $serialNumber);

           // value of $accountNumber = '0000014579'
        }
    }
```

### Incoming features

[](#incoming-features)

- Get bank name from a NUBAN number
- Support for more financial institutions
- Ability to input bank alias in place of bank code
- much more

### Want to Contribute?

[](#want-to-contribute)

- Create an issue or
- Make a fork of this repository
- Create a new branch on your repository.
- Make contributions on that branch.
- Add tests for new features.
- Commit your changes and Push.
- Make a pull request to the base branch. VOILA!!

### Love this package?

[](#love-this-package)

> Please star this repo.

Follow me on [Twitter](https://twitter.com/iemyu_) for more updates!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1842d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44653560?v=4)[Umar](/maintainers/emyu01)[@emyu01](https://github.com/emyu01)

---

Top Contributors

[![emyu01](https://avatars.githubusercontent.com/u/44653560?v=4)](https://github.com/emyu01 "emyu01 (6 commits)")[![deepsourcebot](https://avatars.githubusercontent.com/u/60907429?v=4)](https://github.com/deepsourcebot "deepsourcebot (1 commits)")

---

Tags

accountbankscbndeposit-money-banksnigerianubanphpNubannigerian bankscentral bank of nigeria

### Embed Badge

![Health badge](/badges/emyu-nuban/health.svg)

```
[![Health](https://phpackages.com/badges/emyu-nuban/health.svg)](https://phpackages.com/packages/emyu-nuban)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
