MirrorAPI/actions/validations/email.py

9 lines
No EOL
204 B
Python

import re
class Email:
@staticmethod
def is_valid_email(email: str) -> bool:
"""Check if email has a valid structure"""
return bool(re.match(r"^[\w\.-]+@[\w\.-]+\.\w+$", email))