Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always zerofill serial numbers when validating Swedish IBANs #256

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

jcollins-gc
Copy link
Contributor

For any account number that starts with a zero, when converted into an IBAN (without a clearing code) and attempting to validate it, we currently over-trim the leading zeroes. This leads us to incorrectly reject these IBANs.

This change will only use the zero-fill flag when validating local details. Validating SWIFT details will always zero-fill before validation as the SWIFT account itself is zero-padded.

It also reverts the change to clearing code 3300, after better understanding these accounts.

@jcollins-gc jcollins-gc marked this pull request as draft February 17, 2025 18:09
For any account number that starts with a zero, when converted into an IBAN (without a clearing code) and attempting to validate it, we currently over-trim the leading zeroes.  This leads us to incorrectly reject these IBANs.

This change will only use the zero-fill flag when validating local details.  Validating SWIFT details will always zero-fill before validation as the SWIFT account itself is zero-padded.

It also reverts the change to clearing code 3300, after better understanding these accounts.
@jcollins-gc jcollins-gc force-pushed the sweden-iban-swift-account-validation branch from aa942e1 to 109d4d6 Compare February 18, 2025 06:40
@jcollins-gc jcollins-gc marked this pull request as ready for review February 18, 2025 09:32
@jcollins-gc jcollins-gc merged commit d496733 into master Feb 18, 2025
5 checks passed
@jcollins-gc jcollins-gc deleted the sweden-iban-swift-account-validation branch February 18, 2025 11:11
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