comparison rhodecode/model/forms.py @ 960:029e69f0d21d beta

fixed #102 allowed '.' character in username
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 26 Jan 2011 17:38:08 +0100
parents fff21c9b075c
children 72f008ed9b18
comparison
equal deleted inserted replaced
959:fff21c9b075c 960:029e69f0d21d
76 case_insensitive=True): 76 case_insensitive=True):
77 raise formencode.Invalid(_('This username already exists') , 77 raise formencode.Invalid(_('This username already exists') ,
78 value, state) 78 value, state)
79 79
80 80
81 if re.match(r'^[a-zA-Z0-9]{1}[a-zA-Z0-9\-\_]+$', value) is None: 81 if re.match(r'^[a-zA-Z0-9]{1}[a-zA-Z0-9\-\_\.]+$', value) is None:
82 raise formencode.Invalid(_('Username may only contain ' 82 raise formencode.Invalid(_('Username may only contain '
83 'alphanumeric characters underscores ' 83 'alphanumeric characters underscores, '
84 'or dashes and must begin with ' 84 'periods or dashes and must begin with '
85 'alphanumeric character'), 85 'alphanumeric character'),
86 value, state) 86 value, state)
87 87
88 88
89 89