Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Requires real input in notice form fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Sommerhalder committed Mar 25, 2019
1 parent 0fd070b commit 4866fb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog
---------

- Requires real input in notice form fields.
[msom]

1.22.4 (2019-03-14)
~~~~~~~~~~~~~~~~~~~~

Expand Down
14 changes: 10 additions & 4 deletions onegov/gazette/forms/notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from wtforms import TextAreaField
from wtforms.fields.html5 import DateField
from wtforms.validators import InputRequired
from wtforms.validators import DataRequired
from wtforms.validators import Length


Expand All @@ -34,6 +35,7 @@ class NoticeForm(Form):
label=_("Title (maximum 60 characters)"),
validators=[
InputRequired(),
DataRequired(),
Length(max=60)
],
render_kw={'maxlength': 60},
Expand Down Expand Up @@ -74,7 +76,8 @@ class NoticeForm(Form):
render_kw={'rows': 3},
depends_on=('at_cost', 'yes'),
validators=[
InputRequired()
InputRequired(),
DataRequired(),
]
)

Expand All @@ -90,14 +93,16 @@ class NoticeForm(Form):
label=_("Text"),
tags=('strong', 'ol', 'ul'),
validators=[
InputRequired()
InputRequired(),
DataRequired(),
]
)

author_place = StringField(
label=_("Place"),
validators=[
InputRequired()
InputRequired(),
DataRequired(),
]
)

Expand All @@ -116,7 +121,8 @@ class NoticeForm(Form):
author_name = TextAreaField(
label=_("Author"),
validators=[
InputRequired()
InputRequired(),
DataRequired(),
],
render_kw={'rows': 4},
)
Expand Down

0 comments on commit 4866fb0

Please sign in to comment.