mirror of
https://github.com/django/django.git
synced 2026-02-09 02:49:25 +08:00
[6.0.x] Clarified EmailValidator docs to specify it validates an email address.
Updated the EmailValidator docs in docs/ref/validators.txt to explicitly
state that it validates an email address, to avoid confusion with
validating email message content.
Backport of a4f7674134 from main.
This commit is contained in:
@@ -133,8 +133,8 @@ to, or in lieu of custom ``field.clean()`` methods.
|
||||
:param code: If not ``None``, overrides :attr:`code`.
|
||||
:param allowlist: If not ``None``, overrides :attr:`allowlist`.
|
||||
|
||||
An :class:`EmailValidator` ensures that a value looks like an email, and
|
||||
raises a :exc:`~django.core.exceptions.ValidationError` with
|
||||
An :class:`EmailValidator` ensures that a value looks like an email
|
||||
address, and raises a :exc:`~django.core.exceptions.ValidationError` with
|
||||
:attr:`message` and :attr:`code` if it doesn't. Values longer than 320
|
||||
characters are always considered invalid.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user