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:
committed by
Tim Graham
parent
6bb3b2bff4
commit
a0c07d77fc
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user