stdnum.al.nipt

NIPT (Numri i Identifikimit për Personin e Tatueshëm, Albanian VAT number).

The Albanian NIPT is a 10-digit number with the first and last character being letters.

>>> validate('AL J 91402501 L')
'J91402501L'
>>> validate('K22218003V')
'K22218003V'
>>> validate('(AL) J 91402501')
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> validate('Z 22218003 V')
Traceback (most recent call last):
    ...
InvalidFormat: ...
stdnum.al.nipt.compact(number)

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

stdnum.al.nipt.is_valid(number)

Check if the number is a valid VAT number.

stdnum.al.nipt.validate(number)

Check if the number is a valid VAT number. This checks the length and formatting.