Internal API¶
Halogen exceptions.
-
exception
halogen.exceptions.
ValidationError
(errors, attr=None, index=None)[source]¶ Validation failed.
Halogen basic type validators.
-
class
halogen.validators.
Length
(min_length=None, max_length=None, min_err=None, max_err=None)[source]¶ Length validator that checks the length of a List-like type.
-
class
halogen.validators.
Range
(min=None, max=None, min_err=None, max_err=None)[source]¶ Range validator.
Validator which succeeds if the value it is passed is greater or equal to
min
and less than or equal tomax
. Ifmin
is not specified, or is specified asNone
, no lower bound exists. Ifmax
is not specified, or is specified asNone
, no upper bound exists.