##// END OF EJS Templates
make email validation regexp match the error description - single letter is ok
Mads Kiilerich -
r3186:fc26083c beta
parent child Browse files
Show More
@@ -103,7 +103,7 b' def ValidUsername(edit=False, old_data={'
103 msg = M(self, 'username_exists', state, username=value)
103 msg = M(self, 'username_exists', state, username=value)
104 raise formencode.Invalid(msg, value, state)
104 raise formencode.Invalid(msg, value, state)
105
105
106 if re.match(r'^[a-zA-Z0-9]{1}[a-zA-Z0-9\-\_\.]+$', value) is None:
106 if re.match(r'^[a-zA-Z0-9]{1}[a-zA-Z0-9\-\_\.]*$', value) is None:
107 msg = M(self, 'invalid_username', state)
107 msg = M(self, 'invalid_username', state)
108 raise formencode.Invalid(msg, value, state)
108 raise formencode.Invalid(msg, value, state)
109 return _validator
109 return _validator
General Comments 0
You need to be logged in to leave comments. Login now