PVM (Pridėtinės vertės mokestis mokėtojo kodas, Lithuanian VAT number).

The PVM is used for VAT purposes in Lithuania. It is 9 digits (for legal entities) or 12 digits long (for temporarily registered taxpayers). This module does not check the format of Lithuanian personal codes (Asmens kodas).

>>> validate('119511515')  # organisation
>>> validate('LT 100001919017')  # temporarily registered
>>> validate('100001919018')  # invalid check digit
Traceback (most recent call last):
InvalidChecksum: ...
>>> validate('100004801610')  # second step in check digit calculation

Calculate the check digit. The number passed should not have the check digit included.

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

Check if the number is a valid VAT number.

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