Skip to content
Snippets Groups Projects
Commit 0375cceb authored by Martin Mareš's avatar Martin Mareš
Browse files

Kód místa nesmí začínat na "#"

Closes #263.
parent 14b7fe4f
Branches
No related tags found
No related merge requests found
......@@ -71,6 +71,10 @@ class PlaceEditForm(FlaskForm):
)
submit = wtforms.SubmitField('Uložit')
def validate_code(form: FlaskForm, field: mo_fields.String) -> None:
if field.data is not None and field.data.startswith('#'):
raise wtforms.ValidationError('Kód nesmí začínat na znak "#".')
class PlaceSchoolEditForm(PlaceEditForm):
red_izo = mo_fields.String('RED_IZO')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment