stdnum.nl.onderwijsnummer¶
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')
'101222331'
>>> 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: ...
-
stdnum.nl.onderwijsnummer.
compact
(number)¶ Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.
-
stdnum.nl.onderwijsnummer.
validate
(number)¶ 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.
-
stdnum.nl.onderwijsnummer.
is_valid
(number)¶ Check if the number is a valid onderwijsnummer.