Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Nigeria (NG): postal code format is out of date since the 2026 digital postcode

未关闭 适合新手
#255 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
data

调研方向

首先找到与 https://chromium-i18n.appspot.com/ssl-address/data/NG 对应的尼日利亚 (NG) 地址数据条目,并检查相邻国家条目是如何验证或测试的。将当前的六位数字模式与提供的 NDAPS 格式和示例进行比较;完成标准是新格式和旧的六位数字代码都能通过验证,并且邮政编码 URL 和示例已更新。

由索引模型根据 Issue 内容生成。

描述

The address data for Nigeria still describes the old six-digit postal code:

https://chromium-i18n.appspot.com/ssl-address/data/NG

"zip": "\d{6}", "zipex": "930283,300001,931104", "posturl": "http://www.nigeriapostcodes.com/"

On 1 October 2026 Nigeria launched the National Digital Alphanumeric Postcode System (NDAPS), which gives every building an 11-character code such as FC 02 A09 DB 09 or EK-01-A03-FK-01. Addresses carrying the new code fail validation against \d{6}.

Format, from NIPOST's developer documentation:

Segment Example Shape
State EK 2 letters
LGA 01 2 digits, 01 to 99
District A03 3 letters or digits
Area FK 2 letters
Building unit 01 2 digits, 01 to 99

It is written with hyphens (EK-01-A03-FK-01), with spaces (EK 01 A03 FK 01), or compact (EK01A03FK01).

Sources

Suggested data

A pattern that accepts the new code and keeps the six-digit one valid:

[A-Z]{2}[ -]?(?:0[1-9]|[1-9]\d)[ -]?[A-Z\d]{3}[ -]?[A-Z]{2}[ -]?(?:0[1-9]|[1-9]\d)|\d{6}
  • zipex: FC 02 A09 DB 09,EK-01-A03-FK-01,930283
  • posturl: https://postcode.gov.ng/

I maintain open-source parsers for the format with shared test vectors, which may help when checking the pattern: https://github.com/Adeniyikayodee/ng-postcode/blob/main/spec/vectors.json

主要语言
C++
星标
629
派生
109
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

google/libaddressinput 的其他 Issue

查看 google/libaddressinput 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。