Skip to content

bagof.validators.exceptions

Exceptions raised by validators on validation error.

Classes

ValidationError

ValidationError(*args, **kwargs)

Bases: MagicError

Base class for all validation errors.

Note

The concrete ValueValidationError and TypeValidationError subclasses also inherit from the built-in ValueError and TypeError, so they can be caught as either.

ValueValidationError

ValueValidationError(*args, **kwargs)

Bases: ValidationError, ValueError

Raised when validation fails because of the value of an object.

TypeValidationError

TypeValidationError(*args, **kwargs)

Bases: ValidationError, TypeError

Raised when validation fails because of the type of an object.