Commit | Line | Data |
---|---|---|
56d821eb OL |
1 | # -*- encoding: utf-8 -*- |
2 | ||
3 | import datetime | |
4 | from django.core.exceptions import ValidationError | |
5 | from django.utils.translation import ugettext_lazy as _ | |
6 | ||
7 | def validate_date_passee(date): | |
8 | if date >= datetime.date.today(): | |
9 | raise ValidationError(_(u"La date ne peut pas être future")) |