# HG changeset patch # User Mads Kiilerich # Date 1358794031 -3600 # Node ID fc26083c7436394d3929e5759d647f078e230a6e # Parent a665d8cdd351d81dc414b9bc8285cbd3a7112cf5 make email validation regexp match the error description - single letter is ok diff -r a665d8cdd351 -r fc26083c7436 rhodecode/model/validators.py --- a/rhodecode/model/validators.py Mon Jan 21 23:14:43 2013 +0100 +++ b/rhodecode/model/validators.py Mon Jan 21 19:47:11 2013 +0100 @@ -103,7 +103,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