We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06a19c6 commit 9a2ed19Copy full SHA for 9a2ed19
ellar/pydantic/emails.py
@@ -11,13 +11,15 @@
11
from ellar.common.logging import logger
12
13
@as_pydantic_validator(
14
- "__validate_input", schema={"type": "string", "format": "email"}
+ "__validate_input__", schema={"type": "string", "format": "email"}
15
)
16
- class EmailStr(str): # type: ignore
+ class FallbackEmailStr(str): # type: ignore
17
@classmethod
18
- def __validate_input(cls, __input_value: t.Any, _: t.Any) -> str:
+ def __validate_input__(cls, __input_value: t.Any, _: t.Any) -> str:
19
logger.warning(
20
"email-validator not installed, email fields will be treated as str.\n"
21
"To install, run: pip install email-validator"
22
23
return str(__input_value)
24
+
25
+ EmailStr = FallbackEmailStr
0 commit comments