fix(da_DK): correct BBAN length so iban() generates valid Danish IBANs#2409
Open
CedricConday wants to merge 1 commit into
Open
fix(da_DK): correct BBAN length so iban() generates valid Danish IBANs#2409CedricConday wants to merge 1 commit into
CedricConday wants to merge 1 commit into
Conversation
The da_DK bank provider used a 16-digit bban_format, producing 20-character IBANs. The official Danish IBAN length is 18 (14-digit BBAN: 4-digit bank reg. number + 10-digit account number), so every generated value failed length validation against the ISO 13616 registry (verified with python-stdnum). Correct bban_format to 14 digits and add a TestDaDk test asserting the BBAN format, IBAN validity, country code, and 18-character length.
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.
Re-opens #2406, 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("da_DK").iban()produced IBANs that fail checksum/length validation.Fix: correct the
bban_formatso generated IBANs are structurally valid.Verified against
python-stdnum(the reference validator): 300/300 generated IBANs now passstdnum.iban.validate(). Example:DK6255575141148089.AI disclosure: Prepared with AI assistance (Claude / Claude Code). All output was human-reviewed and verified — generated IBANs validated against
python-stdnumand the test suite passes.