From a4f76741340fb23566795e83f830a3f2d49acce0 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Sun, 3 Aug 2025 22:25:34 -0700 Subject: [PATCH] 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. --- docs/ref/validators.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index 59eef7b35e..39b712695e 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -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.