class EmailValidator(message=None, code=None, whitelist=None) [source]
| Parameters: |
|
|---|
-
message -
The error message used by
ValidationErrorif validation fails. Defaults to"Enter a valid email address".
-
code -
The error code used by
ValidationErrorif validation fails. Defaults to"invalid".
-
whitelist -
Whitelist of email domains to allow. By default, a regular expression (the
domain_regexattribute) is used to validate whatever appears after the @ sign. However, if that string appears in the whitelist, this validation is bypassed. If not provided, the default whitelist is['localhost']. Other domains that don’t contain a dot won’t pass validation, so you’d need to whitelist them as necessary.
Please login to continue.