1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 04:10:47 +00:00

Change group label name

This commit is contained in:
xiez
2012-09-24 10:10:01 +08:00
parent 07378acef1
commit 7f24c337c7
28 changed files with 65 additions and 65 deletions

View File

@@ -25,13 +25,13 @@ class GroupAddForm(forms.Form):
A form used to add a new group.
"""
group_name = forms.CharField(max_length=255, error_messages={
'required': u'组名称不能为空',
'max_length': u'组名称太长不超过255个字符',
'required': u'组名称不能为空',
'max_length': u'组名称太长不超过255个字符',
})
def clean_group_name(self):
group_name = self.cleaned_data['group_name']
if not validate_group_name(group_name):
error_msg = u'组名称只能包含中英文字符,数字及下划线。'
error_msg = u'组名称只能包含中英文字符,数字及下划线。'
raise forms.ValidationError(error_msg)
else:
return group_name