Permalink
Browse files

Add maximum length correctly

  • Loading branch information...
ibot3 committed Oct 15, 2018
1 parent e1c717c commit 5c56eb05cf329deed1ca9d28058840a56a3d7f2c
Showing with 2 additions and 2 deletions.
  1. +2 −2 sipa/forms.py
@@ -181,7 +181,7 @@ class ChangeMACForm(FlaskForm):
description="XX:XX:XX:XX:XX:XX")
host_name = StringField(label=lazy_gettext("Neuer Gerätename (Optional)"),
validators=[Regexp(regex="^[a-zA-Z0-9 ]+", message=u"Gerätename ist ungültig"),
Optional()],
Optional(), Length(-1, 30, lazy_gettext("Gerätename zu lang"))],
description="TL-WR841N, MacBook, FritzBox, PC, Laptop, o.Ä.")


@@ -200,7 +200,7 @@ class ActivateNetworkAccessForm(FlaskForm):
description="YYYY-MM-DD (z.B. 1995-10-23)")
host_name = StringField(label=lazy_gettext("Gerätename (Optional)"),
validators=[Regexp(regex="^[a-zA-Z0-9 ]+", message=u"Gerätename ist ungültig"),
Optional(), Length(-1, 30), lazy_gettext("Gerätename zu lang")],
Optional(), Length(-1, 30, lazy_gettext("Gerätename zu lang"))],
description="TL-WR841N, MacBook, FritzBox, PC, Laptop, o.Ä.")


0 comments on commit 5c56eb0

Please sign in to comment.