diff --git a/modules/auth/auth.go b/modules/auth/auth.go index b085527554..0e87168891 100644 --- a/modules/auth/auth.go +++ b/modules/auth/auth.go @@ -23,7 +23,7 @@ type Form interface { } type RegisterForm struct { - UserName string `form:"username" binding:"Required;AlphaDash;MinSize(5);MaxSize(30)"` + UserName string `form:"username" binding:"Required;AlphaDash;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"` @@ -59,7 +59,7 @@ func (f *RegisterForm) Validate(errors *binding.Errors, req *http.Request, conte } type LogInForm struct { - UserName string `form:"username" binding:"Required;AlphaDash;MinSize(5);MaxSize(30)"` + UserName string `form:"username" binding:"Required;AlphaDash;MaxSize(30)"` Password string `form:"passwd" binding:"Required;MinSize(6);MaxSize(30)"` } diff --git a/public/js/app.js b/public/js/app.js index 69d21020e8..0f0ecc43ea 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -78,7 +78,6 @@ function initRegister() { rules: { "username": { required: true, - minlength: 5, maxlength: 30 }, "email": { diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl index ba41b0c9bb..2f1e82c730 100644 --- a/templates/user/signup.tmpl +++ b/templates/user/signup.tmpl @@ -7,7 +7,7 @@
- +