Repository navigation
Accept the 11-character postal code for Nigeria (NG) - #253
Merged
Merged
Conversation
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. |
Contributor
|
Thanks! |
Contributor
Author
|
Thank you, @bojanz, for the quick merge and release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.