diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/validators.txt | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index 6374f4e8cd..4669ba28d7 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -119,11 +119,11 @@ to, or in lieu of custom ``field.clean()`` methods. ``EmailValidator`` ------------------ -.. class:: EmailValidator(message=None, code=None, whitelist=None) +.. class:: EmailValidator(message=None, code=None, allowlist=None) :param message: If not ``None``, overrides :attr:`.message`. :param code: If not ``None``, overrides :attr:`code`. - :param whitelist: If not ``None``, overrides :attr:`whitelist`. + :param allowlist: If not ``None``, overrides :attr:`allowlist`. .. attribute:: message @@ -136,14 +136,22 @@ to, or in lieu of custom ``field.clean()`` methods. The error code used by :exc:`~django.core.exceptions.ValidationError` if validation fails. Defaults to ``"invalid"``. - .. attribute:: whitelist + .. attribute:: allowlist - 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. + Allowlist of email domains. 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 ``allowlist``, + this validation is bypassed. If not provided, the default ``allowlist`` + is ``['localhost']``. Other domains that don't contain a dot won't pass + validation, so you'd need to add them to the ``allowlist`` as + necessary. + + .. deprecated:: 3.2 + + The ``whitelist`` parameter is deprecated. Use :attr:`allowlist` + instead. + The undocumented ``domain_whitelist`` attribute is deprecated. Use + ``domain_allowlist`` instead. ``URLValidator`` ---------------- |
