Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VALIDATOR-496] IBANValidator: Fix IBAN 'c' pattern according to specification #294

Closed

Conversation

slawekjaranowski
Copy link
Member

No description provided.

@sebbASF
Copy link
Contributor

sebbASF commented Dec 18, 2024

I agree that the PDF file says that 'c' includes lower-case, however that may not be the full story.

Please see the comments here:

* Wikipedia [1] says that only uppercase is allowed.
* The SWIFT PDF file [2] implies that lower case is allowed.
* However there are no examples using lower-case.
* Unfortunately the relevant ISO documents (ISO 13616-1) are not available for free.
* The IBANCheckDigit code treats upper and lower case the same,
* so any case validation has to be done in this class.
*
* Note: the European Payments council has a document [3] which includes a description
* of the IBAN. Section 5 clearly states that only upper case is allowed.
* Also the maximum length is 34 characters (including the country code),
* and the length is fixed for each country.
*
* It looks like lower-case is permitted in BBANs, but they must be converted to
* upper case for IBANs.
*
* [1] https://en.wikipedia.org/wiki/International_Bank_Account_Number
* [2] http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf (404)
* => https://www.swift.com/sites/default/files/resources/iban_registry.pdf
* The above is an old version (62, Jan 2016)
* As of May 2020, the current IBAN standards are located at:
* https://www.swift.com/standards/data-standards/iban
* The above page contains links for the PDF and TXT (CSV) versions of the registry
* Warning: these may not agree -- in the past there have been discrepancies.
* The TXT file can be used to determine changes which can be cross-checked in the PDF file.
* [3] http://www.europeanpaymentscouncil.eu/documents/ECBS%20IBAN%20standard%20EBS204_V3.2.pdf

@sebbASF
Copy link
Contributor

sebbASF commented Dec 19, 2024

The following documents also say that IBAN is upper-case only:

http://www.pruefziffernberechnung.de/Originaldokumente/IBAN/SIG203V3FV_181200.pdf (section 5.1, p9)
https://www.ecbs.org/Download/EBS204_V3.2.pdf (sect 5.1)

@slawekjaranowski
Copy link
Member Author

@sebbASF thanks ... so I close it 😄

@slawekjaranowski slawekjaranowski deleted the VALIDATOR-496 branch December 19, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants