You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which states that an IBAN is a string valid according to the regex [A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}. This makes that a value like ZZ12345678901234SOMEASCIITEXT is valid according to the XSD. (This exact value didn't occur in a file but the same pattern was observed).
There is a change this is an issue at the banking software, however currently this lib validates the IBAN as being valid when parsing the file. This poses several issues:
This library does something beyond what is in the specification
Throws an exception while parsing the file when an invalid IBAN is encountered, resulting in an unreadable file
Possible solutions
The obvious solution is removing the IBAN validation, but this could have a high impact on other users who might be unaware of such a change.
Another option might be to provide context/config in order to indicate if you want to validate the IBAN or if your need is to be willing to accept unvalidated values (and thus possible accept invalid IBAN values)
A third option is to make the validation lazy e.g. only validating the IBAN value when invoking getIban or __toString() methods. As this would allow to wrap those methods being invoked in a try-catch block at level where this library is being used.
Before starting to work on a pull request it might be best to pick a solution direction before putting in any effort.
The text was updated successfully, but these errors were encountered:
Introduction
The
urn:iso:std:iso:20022:tech:xsd:camt.053.001.12
XSD describes theIBAN2007Identifier
as follows:Problem
Which states that an IBAN is a string valid according to the regex
[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}
. This makes that a value likeZZ12345678901234SOMEASCIITEXT
is valid according to the XSD. (This exact value didn't occur in a file but the same pattern was observed).There is a change this is an issue at the banking software, however currently this lib validates the IBAN as being valid when parsing the file. This poses several issues:
Possible solutions
getIban
or__toString()
methods. As this would allow to wrap those methods being invoked in atry-catch
block at level where this library is being used.Before starting to work on a pull request it might be best to pick a solution direction before putting in any effort.
The text was updated successfully, but these errors were encountered: