mirror of https://github.com/django/django.git
Corrected FileExtensionValidator doc regarding the value being validated.
This commit is contained in:
parent
2862760894
commit
c01409c789
|
@ -284,8 +284,8 @@ to, or in lieu of custom ``field.clean()`` methods.
|
||||||
.. versionadded:: 1.11
|
.. versionadded:: 1.11
|
||||||
|
|
||||||
Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
|
Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
|
||||||
``'invalid_extension'`` if the ``value`` cannot be found in
|
``'invalid_extension'`` if the extension of ``value.name`` (``value`` is
|
||||||
``allowed_extensions``.
|
a :class:`~django.core.files.File`) isn't found in ``allowed_extensions``.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
|
@ -300,5 +300,6 @@ to, or in lieu of custom ``field.clean()`` methods.
|
||||||
|
|
||||||
.. versionadded:: 1.11
|
.. versionadded:: 1.11
|
||||||
|
|
||||||
Uses Pillow to ensure that the ``value`` is `a valid image extension
|
Uses Pillow to ensure that ``value.name`` (``value`` is a
|
||||||
|
:class:`~django.core.files.File`) has `a valid image extension
|
||||||
<https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html>`_.
|
<https://pillow.readthedocs.io/en/latest/handbook/image-file-formats.html>`_.
|
||||||
|
|
Loading…
Reference in New Issue