Show More
@@ -164,8 +164,8 b' def ValidUsername(localizer, edit=False,' | |||
|
164 | 164 | _('Username "%(username)s" is forbidden'), |
|
165 | 165 | 'invalid_username': |
|
166 | 166 | _('Username may only contain alphanumeric characters ' |
|
167 |
|
|
|
168 |
|
|
|
167 | 'underscores, periods or dashes and must begin with ' | |
|
168 | 'alphanumeric character or underscore') | |
|
169 | 169 | } |
|
170 | 170 | |
|
171 | 171 | def _validate_python(self, value, state): |
@@ -223,7 +223,7 b' def ValidUserGroup(localizer, edit=False' | |||
|
223 | 223 | 'invalid_group': _('Invalid user group name'), |
|
224 | 224 | 'group_exist': _('User group `%(usergroup)s` already exists'), |
|
225 | 225 | 'invalid_usergroup_name': |
|
226 |
_(' |
|
|
226 | _('User group name may only contain alphanumeric ' | |
|
227 | 227 | 'characters underscores, periods or dashes and must begin ' |
|
228 | 228 | 'with alphanumeric character') |
|
229 | 229 | } |
@@ -231,9 +231,7 b' def ValidUserGroup(localizer, edit=False' | |||
|
231 | 231 | def _validate_python(self, value, state): |
|
232 | 232 | if value in ['default']: |
|
233 | 233 | msg = M(self, 'invalid_group', state) |
|
234 | raise formencode.Invalid( | |
|
235 | msg, value, state, error_dict={'users_group_name': msg} | |
|
236 | ) | |
|
234 | raise formencode.Invalid(msg, value, state) | |
|
237 | 235 | # check if group is unique |
|
238 | 236 | old_ugname = None |
|
239 | 237 | if edit: |
@@ -251,9 +249,7 b' def ValidUserGroup(localizer, edit=False' | |||
|
251 | 249 | |
|
252 | 250 | if re.match(r'^[a-zA-Z0-9]{1}[a-zA-Z0-9\-\_\.]+$', value) is None: |
|
253 | 251 | msg = M(self, 'invalid_usergroup_name', state) |
|
254 | raise formencode.Invalid( | |
|
255 | msg, value, state, error_dict={'users_group_name': msg} | |
|
256 | ) | |
|
252 | raise formencode.Invalid(msg, value, state) | |
|
257 | 253 | return _validator |
|
258 | 254 | |
|
259 | 255 |
General Comments 0
You need to be logged in to leave comments.
Login now