MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / __call__

Method __call__

tortoise/validators.py:83–86  ·  view source on GitHub ↗
(self, value: int | float | Decimal)

Source from the content-addressed store, hash-verified

81 self.min_value = min_value
82
83 def __call__(self, value: int | float | Decimal) -> None:
84 self._validate_type(value)
85 if value < self.min_value:
86 raise ValidationError(f"Value should be greater or equal to {self.min_value}")
87
88
89class MaxValueValidator(NumericValidator):

Callers

nothing calls this directly

Calls 2

ValidationErrorClass · 0.90
_validate_typeMethod · 0.80

Tested by

no test coverage detected