stdnum.ie.pps

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: ...
stdnum.ie.pps.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.ie.pps.is_valid(number)

Checks to see if the number provided is a valid PPS number. This checks the length, formatting and check digit.

stdnum.ie.pps.pps_re = <_sre.SRE_Pattern object at 0xf63530f8>

Regular expression used to check syntax of PPS numbers.

stdnum.ie.pps.validate(number)

Checks to see if the number provided is a valid PPS number. This checks the length, formatting and check digit.

Previous topic

stdnum.iban

Next topic

stdnum.ie.vat