Development
This commit is contained in:
parent
b069aaf19a
commit
87d02f364f
2 changed files with 2 additions and 2 deletions
|
|
@ -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 ''
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue