Skip to content

fix(en_IE): generate structurally valid Irish IBANs - #2411

Open
CedricConday wants to merge 1 commit into
joke2k:masterfrom
CedricConday:fix-en-ie-iban-format
Open

fix(en_IE): generate structurally valid Irish IBANs#2411
CedricConday wants to merge 1 commit into
joke2k:masterfrom
CedricConday:fix-en-ie-iban-format

Conversation

@CedricConday

@CedricConday CedricConday commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Re-opens #2408, which was closed in error (an automated cleanup pass on my account closed a batch of valid PRs and deleted their branches — this restores the work).

Problem: Faker("en_IE").iban() produced IBANs that fail checksum/length validation.

Fix: correct the bban_format so generated IBANs are structurally valid.

Verified against python-stdnum (the reference validator): 300/300 generated IBANs now pass stdnum.iban.validate(). Example: IE90PEMI01217820072677.


AI disclosure: Prepared with AI assistance (Claude / Claude Code). All output was human-reviewed and verified — generated IBANs validated against python-stdnum and the test suite passes.

The en_IE bank provider used a 23-digit bban_format, producing 27-character
all-numeric IBANs. Ireland's IBAN is 22 characters with an 18-character BBAN
of 4 letters (bank identifier) followed by 14 digits (6-digit sort code +
8-digit account), per the ISO 13616 registry. Every generated value failed
both length and structure validation (verified with python-stdnum).

Correct bban_format to '????##############' and update the existing TestEnIe
assertions, which encoded the invalid 23-digit format, to expect the correct
4-letter + 14-digit layout (matching the en_GB test structure).

@fcurella fcurella left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@CedricConday

Copy link
Copy Markdown
Contributor Author

Approved a few weeks back and still clean against main. Anything else needed from me before this can go in? I have #2413 and #2415 open in the same IBAN series if it's easier to take them together.

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