arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
484 stars 203 forks source link

Support for Irish PPS new 2024 B range of numbers #440

Closed Ollymid closed 1 week ago

Ollymid commented 1 month ago

This package is great, and the company I work for has been using the IE PPS validator without any issues for a while now. However this year we've had complaints from clients who have PPS numbers that end with the letter B, which apparently is a new thing as of 2024.

I've tried to find more information about this, but all I've found so far is confirmation from Chartered Accountants Ireland that the rules have changed

Can see the current package operates under the assumption that the second letter can be 'A' (for individuals) or 'H' (for non-individuals, such as limited companies, trusts, partnerships and unincorporated bodies hence why PPSN's ending in B are rejected as being valid.

Where did you get the original ruleset from for the PPS validator? Is there a source we could ask for updated rules?

arthurdejong commented 1 week ago

Thanks for reporting this and providing the fix. It is merged as 58ecb03.

I don't know what the source specification that was originally used was. It was introduced in 89e4d78 and is probably related to the VAT number which was introduced not long before in 2100c28. Support for 2013 numbers was added in a4012f5. Sadly within python-stdnum a lot of these changes can only be done reactively as there is not a mechanism in place to monitor 200+ number formats in a useful way.