NIT (Número De Identificación Tributaria, Colombian identity code).

This number, also referred to as RUT (Registro Unico Tributario) is the Colombian business tax number.

>>> validate('213.123.432-1')
>>> validate('2131234325')
Traceback (most recent call last):
InvalidChecksum: ...
>>> format('2131234321')

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

Convert the number to the minimal representation. This strips surrounding whitespace and separation dash.

Reformat the number to the standard presentation format.

Check if the number is a valid NIT.

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