diff options
| author | Tim Graham <timograham@gmail.com> | 2017-06-07 16:46:52 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-06-07 16:52:50 -0400 |
| commit | 288fd9b9e0a727a6e2374cc181d2c4572ca0cb3d (patch) | |
| tree | c9874abcee317fd24c33805f446437328ddf1dbf /docs/ref | |
| parent | 56e4a01b505089929e3018ea53bdeef16ab7c7c6 (diff) | |
[1.11.x] Corrected FileExtensionValidator doc regarding the value being validated.
Backport of c01409c7899789206b40769ed308e6a7297f9697 from master
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/validators.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index 66803ee534..98152c78a1 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -288,8 +288,8 @@ to, or in lieu of custom ``field.clean()`` methods. .. versionadded:: 1.11 Raises a :exc:`~django.core.exceptions.ValidationError` with a code of - ``'invalid_extension'`` if the ``value`` cannot be found in - ``allowed_extensions``. + ``'invalid_extension'`` if the extension of ``value.name`` (``value`` is + a :class:`~django.core.files.File`) isn't found in ``allowed_extensions``. .. warning:: @@ -304,5 +304,6 @@ to, or in lieu of custom ``field.clean()`` methods. .. 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>`_. |
