stdnum.ee.kmkr

KMKR (Käibemaksukohuslase, Estonian VAT number).

>>> compact('EE 100 931 558')
'100931558'
>>> validate('100594102')
'100594102'
>>> validate('100594103')  # incorrect check digit
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.ee.kmkr.checksum(number: str) int

Calculate the checksum.

stdnum.ee.kmkr.compact(number: str) str

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

stdnum.ee.kmkr.is_valid(number: str) bool

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

stdnum.ee.kmkr.validate(number: str) str

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