Skip to content

Commit 83b5e4a

Browse files
committed
Sync utils classes so they match
1 parent 940f536 commit 83b5e4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

functions/host-info/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def validate_host_id(host_id: str) -> bool:
1616

1717
def validate_email(email: str) -> bool:
1818
"""Validate email format."""
19+
if not email or not isinstance(email, str):
20+
return False
1921
pattern = r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
2022
return bool(re.match(pattern, email))
2123

0 commit comments

Comments
 (0)