def validate_image_extension(value):
config = get_app_config()<EOL>ext = os.path.splitext(value.name)[<NUM_LIT:1>]<EOL>if config and not ext.lower() in config.valid_image_extensions:<EOL><INDENT>raise ValidationError(_("<STR_LIT>"))<EOL><DEDENT>
Validate that a particular image extension.