Skip to content

bagof.validators.misc

Miscellaneous validators (forbidden values, etc.).

Classes

IsNotOneOfValidator

IsNotOneOfValidator(forbidden: Iterable[T], hint: Any = UNSET, compose: bool = False)

Bases: Validator[T]

Validator for values not in a forbidden set.

Parameters:

Name Type Description Default
forbidden Iterable[T]

The set of forbidden values.

required
hint Any

The type hint to validate against. If not provided, the default hint for the class is used.

UNSET
compose bool

Whether to compose this validator with others, when they are found in Annotated metadata.

False

Methods: