Simplify/ibantools

ES IBAN is considered valid if it actually isn't

tarmooo opened this issue · 4 comments

Expected behavior

ES IBAN ES8350210036679521296135 to be invalid

Actual behavior

ES IBAN ES8350210036679521296135 is valid

Steps to reproduce the behavior

validate ES8350210036679521296135 with isValidIBAN function.
Also https://www.iban.com/iban-checker says it is invalid. Seems like validation does not count this spec(check Spain section):
https://docs.oracle.com/cd/E18727_01/doc.121/e13483/T359831T498954.htm
https://www.cnb.cz/export/sites/cnb/cs/platebni-styk/.galleries/iban/download/TR201.pdf

Hi @tarmooo,
You are right, validation currently does not validate account numbers. It's on the roadmap for version 4.

Do you need this functionality only for Spain or for other countries too?

Hey! Thank you for fast reply!

For me i use it for Poland too and it seems poland has some kind of their own stuff too.
I have meanwhile added additional check for Spain - what i did is i validate with this library and my validation function. Can share it if needed.

Yeah, account number is validated differently per country. Several countries do it same way, so that is a plus. Apparently in Austria check digit is even calculated differently depending on bank! This will definitively take some time to completely build, so I'll do it gradually, few counties at the time in every release.

Hi @tarmooo ,
It took me more than a year to find time to add this. Extra validation for Spain and Poland BBANs are added. @sMailund contributed Norway BBAN check. It's published to NPM as version 4.0.0. I'll be slowly adding other countries in the future versions.
I'll close this issue now. Thank you for your patience.