sprain / SprainValidatorBundle

A collection of validators for Symfony2
MIT License
0 stars 0 forks source link

Valid UK IBAN rejected #1

Closed AAtticus closed 11 years ago

AAtticus commented 11 years ago

My client has a UK IBAN that looks like

GB70 HLFX 1234 1234 1234 57

This is a valid IBAN code but gets rejected by the Iban Validator.

sprain commented 11 years ago

I just added more tests for international IBAN numbers and can confirm that the validator fails for UK/GB IBANs. Only for UK/GB that is. Strange indeed. I (or somebody else) will have to take a look at this.

sprain commented 11 years ago

Interestingely, it also fails in a British IBAN validator … http://www.paymentscouncil.org.uk/resources_and_publications/iban_checker/ GB29RBOS60161331926819

sprain commented 11 years ago

However, these work (found them online): GB 12 CPBK 0892 9965 0449 91 GB 29 NWBK 6016 1331 9268 19

The second one looks exactly like the example above, except for the 4-letter bank code. So maybe we are just falling for actually wrong IBANs?

@AAtticus Can you post the exact IBAN of your client for test purposes? If you prefer you can email it to me, I will keep it confidential: manu at sprain.ch

sprain commented 11 years ago

I checked with a bunch of UK IBANs I found online and also with some real life examples from a friend. They all validated as expected. So there is no issue.

I see two reasons for the confusion:

So I am closing this as a non-issue. But at least we have more tests now for proof.