PPS No (Personal Public Service Number, Irish personal number).
The Personal Public Service number consists of 7 digits, and one or two letters. The first letter is a check character. When present (which should be the case for new numbers as of 2013), the second letter can be ‘A’ (for individuals) or ‘H’ (for non-individuals, such as limited companies, trusts, partnerships and unincorporated bodies). Pre-2013 values may have ‘W’, ‘T’, or ‘X’ as the second letter ; it is ignored by the check.
>>> validate('6433435F') # pre-2013
'6433435F'
>>> validate('6433435FT') # pre-2013 with special final 'T'
'6433435FT'
>>> validate('6433435FW') # pre-2013 format for married women
'6433435FW'
>>> validate('6433435E') # incorrect check digit
Traceback (most recent call last):
...
InvalidChecksum: ...
>>> validate('6433435OA') # 2013 format (personal)
'6433435OA'
>>> validate('6433435IH') # 2013 format (non-personal)
'6433435IH'
>>> validate('6433435VH') # 2013 format (incorrect check)
Traceback (most recent call last):
...
InvalidChecksum: ...
Traceback (most recent call last):
...
InvalidChecksum: ...
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
Checks to see if the number provided is a valid PPS number. This checks the length, formatting and check digit.
Regular expression used to check syntax of PPS numbers.
Checks to see if the number provided is a valid PPS number. This checks the length, formatting and check digit.