Skip to content

Instantly share code, notes, and snippets.

View AnnaDamm's full-sized avatar
🏳️‍🌈

Anna Damm AnnaDamm

🏳️‍🌈
View GitHub Profile
@AnnaDamm
AnnaDamm / forms.py
Last active June 28, 2021 09:26 — forked from eerien/forms.py
Comma Separated Values Form Field for Django. There are CommaSeparatedCharField, CommaSeparatedIntegerField.
from django import forms
from django.core import validators
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
class MinLengthValidator(validators.MinLengthValidator):
message = _("Ensure this value has at least %(limit_value)d elements (it has %(show_value)d).")