# Improves form date checking
* adds validator to make sure no dates like `01.01.1` can be accepted. All dates must be somewhat later than 01.01.1950
This commit is contained in:
@@ -15,6 +15,7 @@ from compensation.models import EcoAccount
|
||||
from intervention.models import Handler, Responsibility, Legal
|
||||
from konova.forms import SimpleGeomForm
|
||||
from konova.forms.modals import RemoveModalForm
|
||||
from konova.utils import validators
|
||||
from user.models import User, UserActionLogEntry
|
||||
|
||||
|
||||
@@ -43,6 +44,7 @@ class NewEcoAccountForm(AbstractCompensationForm, CompensationResponsibleFormMix
|
||||
label_suffix="",
|
||||
help_text=_("When did the parties agree on this?"),
|
||||
required=False,
|
||||
validators=[validators.reasonable_date],
|
||||
widget=forms.DateInput(
|
||||
attrs={
|
||||
"type": "date",
|
||||
|
||||
Reference in New Issue
Block a user