I prepare new valtype::iban file for validate Bank Identyficer Number. I think this is good add-ons for tcllib.
Thank you. Is this the
? (As you gave no reference I googled for IBAN and found the above).
Do you have test cases as well, per chance, i.e. examples of correct and incorrect IBANs ?
Yes, this is International_Bank_Account_Number. I attach new version function when i include references. I attach also test script for test correct iban numbers for some countries. I have only examples of correct IBANs.
iban number examples and test script
new version valtype::iban
Thank you. I have integrated this new version with the previous one, extending the range of checks a bit. I also moved some of the fixed values into type variables and simplified an expression, the check itself (nested expr is superfluous).
One of the ibans in your tests is actually not correct, it seems:
becomes 102030170000270200618694 PL78
becomes 102030170000270200618694 2521 78
% 97 == 46 != 1
(Confirmed using 'bc'). Spaces in the numbers just for clarity.
I will take that as a test case of an incorrect number.
Committed everything to CVS head.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.