Mercurial > kallithea
changeset 3914:424b6c711a7f beta
allow underscores in usernames. Helps creating special internal users
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 29 May 2013 12:13:02 +0200 |
parents | 5f192af1ba21 |
children | a42bfe8a9335 |
files | rhodecode/model/validators.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/model/validators.py Wed May 29 00:26:58 2013 +0200 +++ b/rhodecode/model/validators.py Wed May 29 12:13:02 2013 +0200 @@ -88,7 +88,7 @@ 'invalid_username': _(u'Username may only contain alphanumeric characters ' 'underscores, periods or dashes and must begin with ' - 'alphanumeric character') + 'alphanumeric character or underscore') } def validate_python(self, value, state): @@ -105,7 +105,7 @@ msg = M(self, 'username_exists', state, username=value) raise formencode.Invalid(msg, value, state) - if re.match(r'^[a-zA-Z0-9]{1}[a-zA-Z0-9\-\_\.]*$', value) is None: + if re.match(r'^[a-zA-Z0-9\_]{1}[a-zA-Z0-9\-\_\.]*$', value) is None: msg = M(self, 'invalid_username', state) raise formencode.Invalid(msg, value, state) return _validator