1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #28242 -- Moved ImageField file extension validation to the form field.

This commit is contained in:
Manatsawin Hanmongkolchai
2017-05-28 14:05:21 +07:00
committed by Tim Graham
parent 6bb3b2bff4
commit a0c07d77fc
8 changed files with 47 additions and 11 deletions

View File

@@ -591,6 +591,7 @@ class FileField(Field):
class ImageField(FileField):
default_validators = [validators.validate_image_file_extension]
default_error_messages = {
'invalid_image': _(
"Upload a valid image. The file you uploaded was either not an "