Simplify/ibantools

Issues with validation of Finnish Viva wallet IBAN

gianlucacandiotti opened this issue · 2 comments

Describe the bug
Some Viva wallet account numbers from Finland are not passing the isValidIBAN validation.

To Reproduce

import * as ibantools from 'ibantools';

ibantools.isValidIBAN('FI3679823415324729') // false
ibantools.isValidIBAN('FI6879826661004681') // false

Expected behavior
These values should return true as they are valid IBANs.

Environment:
Node v18.15.0 - ibantools@4.3.2

Additional context
We use other libraries in other parts of our system which accept these values as valid, and we also used some online checkers that corroborates their validity, for example the ECBS online checker.

I was checking the source code and manually tested these account numbers against the checkFinlandBBAN function and they fail. The other libraries we use seem to rely only on the ISO 7064 mod-97, and it passes those checks. Maybe the checkFinlandBBAN can be adjusted?

Thanks in advance!

Fixed and new version is rele3ased that covers this one. Sorry that it took me so long and thank you for reporting this.

Thanks a lot for tackling it! 💯