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

Method __call__

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

Source from the content-addressed store, hash-verified

96 self.max_value = max_value
97
98 def __call__(self, value: int | float | Decimal) -> None:
99 self._validate_type(value)
100 if value > self.max_value:
101 raise ValidationError(f"Value should be less or equal to {self.max_value}")
102
103
104class CommaSeparatedIntegerListValidator(Validator):

Callers

nothing calls this directly

Calls 2

ValidationErrorClass · 0.90
_validate_typeMethod · 0.80

Tested by

no test coverage detected