API - add email to contact admin in app config

This commit is contained in:
Sam
2022-03-23 18:29:49 +01:00
parent f650a70ace
commit 49100c27e7
8 changed files with 97 additions and 5 deletions

View File

@ -16,6 +16,8 @@ def is_valid_email(email: str) -> bool:
"""
Return if email format is valid
"""
if not email:
return False
mail_pattern = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
return re.match(mail_pattern, email) is not None