Skip to content

fix(nz/ird): raise the upper limit to 200,000,000 - #266

Merged
koblas merged 1 commit into
mainfrom
fix/nz-ird-upper-limit
Nov 16, 2026
Merged

koblas merged 1 commit into
mainfrom
fix/nz-ird-upper-limit

Conversation

@koblas

@koblas koblas commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Raises the nz/ird upper limit from 150,000,000 to 200,000,000.

The range check added in #254 copied python-stdnum's 10000000 < n < 150000000. Inland Revenue announced on 10 February 2026 that the maximum valid IRD number increases to 200,000,000: https://www.ird.govt.nz/updates/news-folder/2026/increase-to-ird-number-validation-upper-limit

python-stdnum master still uses 150,000,000, so this is now a deliberate difference (doc comment updated; noted on #91).

Tests

  • 150000009 and 199-999-990 (made-up, valid check digits) are now accepted; both fail without the fix (verified by setting ird.ts aside and rerunning the spec).
  • 200000005 (valid check digit) is rejected with InvalidComponent.
  • Check digits cross-checked with python-stdnum's calc_check_digit.
  • npm test (4717 passed), npm run lint, prettier --check pass.

Not verified

  • The IRD page gives no exact go-live date, only that updated specifications are available from April 2026. Lower bound and check-digit algorithm are not mentioned there, so they are unchanged.

Fixes #265

Inland Revenue raised the maximum valid IRD number from 150,000,000 to
200,000,000 in February 2026. python-stdnum still caps at 150,000,000,
so this is a deliberate difference.

Fixes #265
@koblas koblas mentioned this pull request Nov 16, 2026
2 of 32 tasks
@koblas
koblas merged commit eaa1d11 into main Nov 16, 2026
10 checks passed
@koblas
koblas deleted the fix/nz-ird-upper-limit branch November 16, 2026 10:25
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.

NZ IRD failing due to added code check

1 participant