summaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-01 07:35:21 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-01 07:35:21 -0400
commit2a1dc0085b9f7236082f3885fa594ec12d5b0211 (patch)
treea81b38f0e3ac9835519a1057c98813c1ead49ac9 /modules/auth
parent46af92c57e0d0d71f45d13d0b4bacb91ed2db16b (diff)
downloadgitea-2a1dc0085b9f7236082f3885fa594ec12d5b0211.tar.gz
gitea-2a1dc0085b9f7236082f3885fa594ec12d5b0211.zip
fix #91
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/auth.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/auth/auth.go b/modules/auth/auth.go
index e493faefe7..85df42d8c4 100644
--- a/modules/auth/auth.go
+++ b/modules/auth/auth.go
@@ -21,7 +21,7 @@ type Form interface {
}
type RegisterForm struct {
- UserName string `form:"username" binding:"Required;AlphaDash;MaxSize(30)"`
+ UserName string `form:"username" binding:"Required;AlphaDashDot;MaxSize(30)"`
Email string `form:"email" binding:"Required;Email;MaxSize(50)"`
Password string `form:"passwd" binding:"Required;MinSize(6);MaxSize(30)"`
RetypePasswd string `form:"retypepasswd"`
@@ -123,6 +123,8 @@ func validate(errors *base.BindingErrors, data base.TmplData, form Form) {
data["ErrorMsg"] = form.Name(field.Name) + " cannot be empty"
case base.BindingAlphaDashError:
data["ErrorMsg"] = form.Name(field.Name) + " must be valid alpha or numeric or dash(-_) characters"
+ case base.BindingAlphaDashDotError:
+ data["ErrorMsg"] = form.Name(field.Name) + " must be valid alpha or numeric or dash(-_) or dot characters"
case base.BindingMinSizeError:
data["ErrorMsg"] = form.Name(field.Name) + " must contain at least " + getMinMaxSize(field) + " characters"
case base.BindingMaxSizeError: