stdnum.sm.coe

COE (Codice operatore economico, San Marino national tax number).

The COE is a tax identification number of up to 5-digits used in San Marino. Leading zeroes are commonly dropped.

>>> validate('51')
'51'
>>> validate('024165')
'24165'
>>> validate('2416A')
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> validate('1124165')
Traceback (most recent call last):
    ...
InvalidLength: ...
Traceback (most recent call last):
    ...
InvalidLength: ...
stdnum.sm.coe.compact(number)

Convert the number to the minimal representation. This strips surrounding whitespace and separation dash.

stdnum.sm.coe.is_valid(number)

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

stdnum.sm.coe.validate(number)

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

Previous topic

stdnum.sk.rc

Next topic

stdnum.us.atin