validate_image_file_extension
Validates that the provided file value has an extension matching the list of currently available image extensions.
def validate_image_file_extension(
value: File
) - > None
Validates that a file's extension matches one of the currently supported image formats allowed by the system.
Parameters
| Name | Type | Description |
|---|---|---|
| value | File | The uploaded file object or file path containing the extension to be validated against the allowed image extensions list. |
Returns
| Type | Description |
|---|---|
None | Returns None if the validation passes; otherwise, raises a ValidationError if the file extension is not supported. |