Onderwijsnummer (Dutch student school number).

The onderwijsnummers (education number) is very similar to the BSN (Dutch national identification number) for students without a BSN. It uses a checksum mechanism similar to the BSN.

More information:

>>> validate('1012.22.331')
>>> validate('100252333')
Traceback (most recent call last):
InvalidChecksum: ...
>>> validate('1012.22.3333')
Traceback (most recent call last):
InvalidLength: ...
>>> validate('2112.22.337')  # number must start with 10
Traceback (most recent call last):
InvalidFormat: ...

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

Check if the number is a valid onderwijsnummer. This checks the length and whether the check digit is correct and whether it starts with the right sequence.

Check if the number is a valid onderwijsnummer.