From 9442c09eebcd0f67f6f15a1a919504c7678b7ce8 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 4 Sep 2013 16:16:30 +0000 Subject: forms: group name should not start with special character The route // is used for displaying the group infos. If you want to support additional sites (like all public browsable groups), you need a possibility to recognize such urls. So the group name now has to start with a non special characters. So we could support paths like /_all/ for special pages. --- forms.py | 2 ++ 1 file changed, 2 insertions(+) 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.')]) -- cgit v1.2.3-1-g7c22