stdnum.rs.pib¶
PIB (Poreski Identifikacioni Broj, Serbian tax identification number).
The Serbian tax identification number consists of 9 digits where the last digit is a check digit.
>>> validate('101134702')
'101134702'
>>> validate('101134703')
Traceback (most recent call last):
...
InvalidChecksum: ...
-
stdnum.rs.pib.
compact
(number)¶ Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
-
stdnum.rs.pib.
is_valid
(number)¶ Check if the number is a valid VAT number.
-
stdnum.rs.pib.
validate
(number)¶ Check if the number is a valid VAT number. This checks the length, formatting and check digit.