Finnish Association Identifier.

The number consists of 1 to 6 digits that are normally separated with a dot in groups of 0-3 and 0-3 numbers. E.g. 123.123, 12.123, 1.123, 123 or 1.

>>> validate('123.123')
>>> validate('1123')
>>> validate('123123123')
Traceback (most recent call last):
InvalidLength: The number has an invalid length.
>>> validate('12df')
Traceback (most recent call last):
InvalidFormat: The number has an invalid format.
>>> format('123')
>>> format('1234')

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 association register number.

Check if the number is a valid Finnish association register number. This checks the length and format.