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

Method __call__

tortoise/validators.py:44–48  ·  view source on GitHub ↗
(self, value: str)

Source from the content-addressed store, hash-verified

42 self.max_length = max_length
43
44 def __call__(self, value: str) -> None:
45 if value is None:
46 raise ValidationError("Value must not be None")
47 if len(value) > self.max_length:
48 raise ValidationError(f"Length of '{value}' {len(value)} > {self.max_length}")
49
50
51class MinLengthValidator(Validator):

Callers

nothing calls this directly

Calls 1

ValidationErrorClass · 0.90

Tested by

no test coverage detected