ABN (Australian Business Number).

The Australian Business Number (ABN) is an identifier issued to entities registered in the Australian Business Register (ABR). The number consists of 11 digits of which the first two are check digits.

More information:

>>> validate('83 914 571 673')
>>> validate('99 999 999 999')
Traceback (most recent call last):
InvalidChecksum: ...
>>> format('51824753556')
'51 824 753 556'

Calculate the check digits that should be prepended to make the number valid.

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

Reformat the number to the standard presentation format.

Check if the number is a valid ABN.

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