stdnum.no.orgnr

Orgnr (Organisasjonsnummer, Norwegian organisation number).

The Organisasjonsnummer is a 9-digit number with a straightforward check mechanism.

>>> validate('988 077 917')
'988077917'
>>> validate('988 077 918')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('988077917')
'988 077 917'
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.no.orgnr.checksum(number)

Calculate the checksum.

stdnum.no.orgnr.compact(number)

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

stdnum.no.orgnr.format(number)

Reformat the passed number to the standard format.

stdnum.no.orgnr.is_valid(number)

Checks to see if the number provided is a valid organisation number. This checks the length, formatting and check digit.

stdnum.no.orgnr.validate(number)

Checks to see if the number provided is a valid organisation number. This checks the length, formatting and check digit.

Previous topic

stdnum.no.mva

Next topic

stdnum.pl.nip