We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 940f536 commit 83b5e4aCopy full SHA for 83b5e4a
functions/host-info/utils.py
@@ -16,6 +16,8 @@ def validate_host_id(host_id: str) -> bool:
16
17
def validate_email(email: str) -> bool:
18
"""Validate email format."""
19
+ if not email or not isinstance(email, str):
20
+ return False
21
pattern = r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
22
return bool(re.match(pattern, email))
23
0 commit comments