Skip to content

Restrict Norfolk Island postcodes to 2899 - #30

Open
PierreQueyroi wants to merge 1 commit into
brick:mainfrom
PierreQueyroi:nf-single-postcode
Open

PierreQueyroi wants to merge 1 commit into
brick:mainfrom
PierreQueyroi:nf-single-postcode

Conversation

@PierreQueyroi

Copy link
Copy Markdown

Norfolk Island has a single postcode, 2899, in Australia Post's postcode system. NFFormatter accepted any four digits, so values such as 1234 or 2000 passed as Norfolk Island postcodes.

It now accepts 2899 only, the same change as #28 for the Cocos (Keeling) Islands, after BLFormatter. The data provider gains 2899 as valid and 1234, 2898, 2900 as invalid; 1234 was accepted before.

Sources:

How this was found: an AI-assisted comparison between this library and the JavaScript library postcode-validator, run over candidate postcodes generated from both rule sets, listed every country where the two disagree. Each disagreement is then checked against postal sources, and the ones where this library is wrong become a PR, one country at a time. Here postcode-validator already accepts 2899 only.

PHPUnit, PHPStan and ECS pass locally.

@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.21%. Comparing base (4c9484d) to head (088e8b6).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #30   +/-   ##
=========================================
  Coverage     99.21%   99.21%           
  Complexity      503      503           
=========================================
  Files           186      186           
  Lines          1022     1022           
=========================================
  Hits           1014     1014           
  Misses            8        8           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant