fzaninotto / Faker

Faker is a PHP library that generates fake data for you
MIT License
26.79k stars 3.57k forks source link

Generates invalid IBAN #1577

Open ThibaudDauce opened 6 years ago

ThibaudDauce commented 6 years ago

Hi,

Faker just generated the IBAN "FR4350142857692ZLW2D67JCG24" which is invalid according to https://www.ibancalculator.com/iban_validieren.html and my SEPA provider.

Is it normal? If yes, maybe the documentation should be updated to reflect the fact that the IBAN is only partially valid (only the first checksum).

Thanks,

ppelgrims commented 6 years ago

Nice catch, Thibaud! Would you be able to provide us with a PR to fix this? I reckon the unit tests need updating as well.

raphaeldealmeida commented 6 years ago

IBAN contains a registered bank / business identifier code (BIC). For a valid IBAN is necessary store all valid BIC each country. I can't find this official list

sebastiaanspeck commented 6 years ago

IBAN contains a registered bank / business identifier code (BIC). For a valid IBAN is necessary store all valid BIC each country. I can't find this official list

http://www.bankswiftcode.org/

ppelgrims commented 6 years ago

IBAN contains a registered bank / business identifier code (BIC). For a valid IBAN is necessary store all valid BIC each country. I can't find this official list

http://www.bankswiftcode.org/

What kind of license are they using? Doesn't seem like we can use that

sebastiaanspeck commented 6 years ago

IBAN contains a registered bank / business identifier code (BIC). For a valid IBAN is necessary store all valid BIC each country. I can't find this official list

http://www.bankswiftcode.org/

What kind of license are they using? Doesn't seem like we can use that

SWIFT Code or BIC code are part of ISO 9362 -> maybe look at this ISO

lowerends commented 4 years ago

Faker just generated this IBAN which is incorrect as well: CR5810436333847042533. Any pointers on where to fix this in the code? I could try to generate a PR for this.

ppelgrims commented 4 years ago

Faker just generated this IBAN which is incorrect as well: CR5810436333847042533. Any pointers on where to fix this in the code? I could try to generate a PR for this.

Have a look at L83

lowerends commented 4 years ago

Thanks for the pointer. I verified the format of CR IBAN numbers based on the list mentioned in the code and created a PR to fix this: https://github.com/fzaninotto/Faker/pull/1984.

adesandi0 commented 4 years ago

Thanks for the pointer. I verified the format of CR IBAN numbers based on the list mentioned in the code and created a PR to fix this: #1984.

Bro, is the Iban valid?and can be used?