stdnum.hu.anum

ANUM (Közösségi adószám, Hungarian VAT number).

The ANUM is the Hungarian VAT (Közösségi adószám) number. It is an 8-digit taxpayer registration number that includes a weighted checksum.

>>> validate('HU-12892312')
'12892312'
>>> validate('HU-12892313')  # invalid check digit
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.hu.anum.checksum(number)

Calculate the checksum. Valid numbers should have a checksum of 0.

stdnum.hu.anum.compact(number)

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

stdnum.hu.anum.is_valid(number)

Check if the number provided is a valid VAT number.

stdnum.hu.anum.validate(number)

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