from quart_imp.auth import is_email_address_valid
is_email_address_valid(
email_address: str
) -> bool
Checks if an email address is valid.
Is not completely RFC 5322 compliant, but it is good enough for most use cases.
Here are examples of mistakes that it will not catch:
email@[123.123.123.123]
“email”@example.com
very.unusual.“@”.unusual.com@example.com
very.“(),:;<>[]”.VERY.“very@\\ "very”.unusual@strange.example.com
email@example.com (Joe Smith)
email@111.222.333.44444
is_email_address_valid('hello@example.com') # >>> True
is_email_address_valid('hello@hello@example.com') # >>> False