diff --git a/src/agenda_culturel/forms.py b/src/agenda_culturel/forms.py index 8a2f0da..b9149a2 100644 --- a/src/agenda_culturel/forms.py +++ b/src/agenda_culturel/forms.py @@ -29,23 +29,12 @@ class EventForm(ModelForm): del self.fields['status'] - def clean_start_day(self): - start_day = self.cleaned_data.get("start_day") - - if start_day is not None and start_day < date.today(): - raise ValidationError(_("The start date cannot be earler than today.")) - - return start_day - - def clean_end_day(self): start_day = self.cleaned_data.get("start_day") end_day = self.cleaned_data.get("end_day") if end_day is not None and start_day is not None and end_day < start_day: raise ValidationError(_("The end date must be after the start date.")) - if end_day is not None and end_day < date.today(): - raise ValidationError(_("The end date cannot be earler than today.")) return end_day