Skip to content

Commit 288fd9b

Browse files
committed
[1.11.x] Corrected FileExtensionValidator doc regarding the value being validated.
Backport of c01409c from master
1 parent 56e4a01 commit 288fd9b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/ref/validators.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ to, or in lieu of custom ``field.clean()`` methods.
288288
.. versionadded:: 1.11
289289

290290
Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
291-
``'invalid_extension'`` if the ``value`` cannot be found in
292-
``allowed_extensions``.
291+
``'invalid_extension'`` if the extension of ``value.name`` (``value`` is
292+
a :class:`~django.core.files.File`) isn't found in ``allowed_extensions``.
293293

294294
.. warning::
295295

@@ -304,5 +304,6 @@ to, or in lieu of custom ``field.clean()`` methods.
304304

305305
.. versionadded:: 1.11
306306

307-
Uses Pillow to ensure that the ``value`` is `a valid image extension
307+
Uses Pillow to ensure that ``value.name`` (``value`` is a
308+
:class:`~django.core.files.File`) has `a valid image extension
308309
<https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html>`_.

0 commit comments

Comments
 (0)