We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Check digits can have leading zeroes, Modulo97#calculateCheckDigits returns an int so the value needs to be left padded if size is less than two.
Modulo97#calculateCheckDigits
Example (IBAN in example is generated, not a real bank account):
public class CheckDigitsLeadingZeroExample { public static void main(String[] args) { String bban = "50516227620311"; IBAN iban = IBAN.compose("DK", bban); //Expected iban: DK0350516227620311 //throws: Input failed length validation: found 17, but expect 18 for country code. String input = "DK0050516227620311"; int checkDigits = Modulo97.calculateCheckDigits(input); // checkDigits is 3 } }
The text was updated successfully, but these errors were encountered:
Hi @trustlydaniel,
Thanks! That's a good catch. The error is quite glaring once you see it, but I have missed it all these years 😬
Thanks also for providing #93 to fix it. Much appreciated.
Cheers, Barend
Sorry, something went wrong.
1e827ad
Merge branch 'fix_issue_92', fixes #92.
3219bd7
update readme for #92/#93
c27347d
barend
Successfully merging a pull request may close this issue.
Check digits can have leading zeroes,
Modulo97#calculateCheckDigits
returns an int so the value needs to be left padded if size is less than two.Example (IBAN in example is generated, not a real bank account):
The text was updated successfully, but these errors were encountered: