stdnum.exceptions¶
Collection of exceptions.
The validation functions of stdnum should raise one of the below exceptions when validation of the number fails.
-
exception
stdnum.exceptions.InvalidChecksum¶ The number’s internal checksum or check digit does not match.
-
exception
stdnum.exceptions.InvalidComponent¶ One of the parts of the number has an invalid reference.
Some part of the number refers to some external entity like a country code, a date or a predefined collection of values. The number contains some invalid reference.
-
exception
stdnum.exceptions.InvalidFormat¶ Something is wrong with the format of the number.
This generally means characters or delimiters that are not allowed are part of the number or required parts are missing.
-
exception
stdnum.exceptions.InvalidLength¶ The length of the number is wrong.
-
exception
stdnum.exceptions.ValidationError¶ Top-level error for validating numbers.
This exception should normally not be raised, only subclasses of this exception.