OIB (Osobni identifikacijski broj, Croatian identification number).
The personal identification number is used to identify persons and legal entities in Croatia. It has 11 digits (sometimes prefixed by HR), contains no personal information and uses the ISO 7064 Mod 11, 10 checksum algorithm.
>>> validate('HR 33392005961')
'33392005961'
>>> validate('33392005962') # invalid check digit
Traceback (most recent call last):
...
InvalidChecksum: ...
Traceback (most recent call last):
...
InvalidChecksum: ...
Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
Checks to see if the number provided is a valid OIB number. This checks the length, formatting and check digit.
Checks to see if the number provided is a valid OIB number. This checks the length, formatting and check digit.