Skip to content

Accept the 11-character postal code for Nigeria (NG) - #253

Merged
bojanz merged 1 commit into
commerceguys:mainfrom
Adeniyikayodee:ng-digital-postcode
Oct 9, 2026
Merged

bojanz merged 1 commit into
commerceguys:mainfrom
Adeniyikayodee:ng-digital-postcode

Conversation

@Adeniyikayodee

Copy link
Copy Markdown
Contributor

NIPOST launched a new postcode for Nigeria in October 2026. It has 11 characters in five segments, for example EK-01-A03-FK-01: two letters, two digits, three letters or digits, two letters, and two digits. The two numeric segments run from 01 to 99.

The NG pattern accepted six digits only, so every new code failed validation. It now accepts both, with the new code written with hyphens, with spaces, or with no separator.

Format reference: https://docs.postcode.gov.ng/concepts/postcode-format

PHPUnit passes locally.

@Adeniyikayodee

Copy link
Copy Markdown
Contributor Author

@bojanz, I would be grateful if you could look at this whenever your time allows. Nigeria launched a new national postcode on 1 October, and the NG pattern still describes the six-digit code it replaces. Many shops and platforms take their address rules from this library, so I wanted to raise it here with care. The format and its source are in the description, and I am glad to adjust the pattern or the test to fit how you prefer them. Thank you for the work you put into this library, and please take it at your own pace.

@bojanz
bojanz merged commit e3ce667 into commerceguys:main Oct 9, 2026
5 checks passed
@bojanz

bojanz commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@Adeniyikayodee

Adeniyikayodee commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Thank you, @bojanz, for the quick merge and release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants