Development

This commit is contained in:
Matthew Grotke 2026-06-10 23:34:36 -04:00
parent b069aaf19a
commit 87d02f364f
2 changed files with 2 additions and 2 deletions

View file

@ -201,7 +201,7 @@ def time_24h(value, max_len=5):
def email(value, max_len=254):
"""Email address: strict format check. Returns lowercased address or empty string."""
s = str(value).strip().lower()[:max_len]
if re.fullmatch(r'[a-z0-9._%+\-]+@[a-z0-9.\-]+\.[a-z]{2,}', s):
if re.fullmatch(r'[a-z0-9._+\-]+@[a-z0-9.\-]+\.[a-z]{2,}', s):
return s
return ''