summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--forms.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/forms.py b/forms.py
index d1fad64..ec643ac 100644
--- a/forms.py
+++ b/forms.py
@@ -7,6 +7,8 @@ class CreateGroup(Form):
validators.Required(),
validators.Regexp('^[a-zA-Z1-9_-]+$',
message=u'Invalid group name (only simple characters, numbers, - and _).'),
+ validators.Regexp('^[a-zA-Z1-9]',
+ message=u'Group name should not start with a special character.'),
Unique(Group, Group.name,
message=u'A group with this name already exists.')])