Skip to content

Commit

Permalink
feat: add validation to FundingForm
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoStorm96 committed Oct 1, 2024
1 parent 8ebd455 commit 0b715db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proposals/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ class Meta:
def clean(self):
cleaned_data = super(FundingForm, self).clean()

if not cleaned_data["funding"]:
self.add_error("funding", _("Je dient minstens een van de opties te selecteren."))

self.check_dependency_multiple(
cleaned_data, "funding", "needs_details", "funding_details"
)
Expand Down

0 comments on commit 0b715db

Please sign in to comment.