Closed raphaelm closed 4 years ago
Looks good, thanks!
I think it's probably worth switching to a validator that uses the official regex. I didn't know about this when I wrote it. The disadvantage to the regex is that it's an all or nothing validation - it will only report valid or invalid but that's probably good enough for most use cases.
In any case, let's get this in now and I'll replace it at some point in the future if / when I have some spare time.
We are still seing some (syntactically) invalid BICs in the wild. These are an annoyance, since banks and banking software validates BICs against the official standards and if we allow BICs that aren't allowed by the standard, we'll run into problems even loading the files in banking software.
The official regex in use in the XML schemas is
[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}
. Currently, we do restrict to the same regex, except for the disallowance of1
at position 7 andO
at position 8. This PR adds these restrictions.Sources
pain.008.03.02.xsd
schema file (and others)All Changes
[x] Add an entry to the docs/changelog.rst describing the change.
[x] Add an entry for your name in the docs/authors.rst file if it's not already there.