New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for a `FileExtensionValidator`. #2

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@jfilipe
Owner

jfilipe commented Apr 14, 2014

Todo:

  • Add docs
  • Possibly add validator as default to ImageField

Ticket: 21548.

@deconstructible
class FileExtensionValidator(object):
message = _("File extension '%(extension)s' is not allowed. Allowed extensions are: '%(allowed_extensions)s'.")

This comment has been minimized.

@timgraham

timgraham Apr 16, 2014

this should have a code attribute and be customizable in __init__ like the other validators

@timgraham

timgraham Apr 16, 2014

this should have a code attribute and be customizable in __init__ like the other validators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment