Skip to main content

validate_email

Email address validation using email-validator.

def validate_email(
value: str
) - > tuple[str, str]

Email address validation using email-validator.

Parameters

NameTypeDescription
valuestrThe raw email address string to validate, which can include "pretty" names or leading/trailing whitespace.

Returns

TypeDescription
tuple[str, str]A tuple containing the local part of the email (or the name for "pretty" email addresses) and the normalized email.