class EmailValidator(message=None, code=None, whitelist=None)
[source]
Parameters: |
|
---|
-
message
-
The error message used by
ValidationError
if validation fails. Defaults to"Enter a valid email address"
.
-
code
-
The error code used by
ValidationError
if validation fails. Defaults to"invalid"
.
-
whitelist
-
Whitelist of email domains to allow. By default, a regular expression (the
domain_regex
attribute) 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.