Fixed #28165 -- Ignored case in FileExtensionValidator's allowed_extensions.

This commit is contained in:
Arne de Laat 2017-06-06 10:57:08 +02:00 committed by Tim Graham
parent b137add6cf
commit 681d2599ee
3 changed files with 12 additions and 0 deletions

View file

@ -286,6 +286,7 @@ to, or in lieu of custom ``field.clean()`` methods.
Raises a :exc:`~django.core.exceptions.ValidationError` with a code of
``'invalid_extension'`` if the extension of ``value.name`` (``value`` is
a :class:`~django.core.files.File`) isn't found in ``allowed_extensions``.
The extension is compared case-insensitively with ``allowed_extensions``.
.. warning::