From c01409c7899789206b40769ed308e6a7297f9697 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 7 Jun 2017 16:46:52 -0400 Subject: [PATCH] Corrected FileExtensionValidator doc regarding the value being validated. --- docs/ref/validators.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index 4bf6a9eafbf..8148dd6f7a4 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -284,8 +284,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:: @@ -300,5 +300,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 `_.