Skip to content

Commit

Permalink
Add valid email function
Browse files Browse the repository at this point in the history
  • Loading branch information
harminius committed Dec 9, 2024
1 parent 62d9336 commit bf00e65
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/mergin/auth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ def is_utf8(text: str) -> bool:
return "�" not in text
except UnicodeDecodeError:
return False


def is_valid_email(email: str) -> bool:
return not contains_email_invalid_characters(email) and is_utf8(email)

0 comments on commit bf00e65

Please sign in to comment.