mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-24 08:06:49 -05:00
change minimum password length to 1
This commit is contained in:
parent
b1696665bd
commit
71fd10dd37
1 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ type InstallForm struct {
|
||||||
RequireSignInView bool
|
RequireSignInView bool
|
||||||
|
|
||||||
AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"`
|
AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"`
|
||||||
AdminPasswd string `binding:"OmitEmpty;MinSize(6);MaxSize(255)" locale:"install.admin_password"`
|
AdminPasswd string `binding:"OmitEmpty;MaxSize(255)" locale:"install.admin_password"`
|
||||||
AdminConfirmPasswd string
|
AdminConfirmPasswd string
|
||||||
AdminEmail string `binding:"OmitEmpty;Email;MaxSize(50)" locale:"install.admin_email"`
|
AdminEmail string `binding:"OmitEmpty;Email;MaxSize(50)" locale:"install.admin_email"`
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) bindin
|
||||||
type RegisterForm struct {
|
type RegisterForm struct {
|
||||||
UserName string `form:"uname" binding:"Required;AlphaDashDot;MaxSize(35)"`
|
UserName string `form:"uname" binding:"Required;AlphaDashDot;MaxSize(35)"`
|
||||||
Email string `form:"email" binding:"Required;Email;MaxSize(50)"`
|
Email string `form:"email" binding:"Required;Email;MaxSize(50)"`
|
||||||
Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
|
Password string `form:"password" binding:"Required;MaxSize(255)"`
|
||||||
Retype string `form:"retype"`
|
Retype string `form:"retype"`
|
||||||
LoginType string `form:"logintype"`
|
LoginType string `form:"logintype"`
|
||||||
LoginName string `form:"loginname"`
|
LoginName string `form:"loginname"`
|
||||||
|
@ -70,7 +70,7 @@ func (f *RegisterForm) Validate(ctx *macaron.Context, errs binding.Errors) bindi
|
||||||
|
|
||||||
type SignInForm struct {
|
type SignInForm struct {
|
||||||
UserName string `form:"uname" binding:"Required;MaxSize(35)"`
|
UserName string `form:"uname" binding:"Required;MaxSize(35)"`
|
||||||
Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
|
Password string `form:"password" binding:"Required;MaxSize(255)"`
|
||||||
Remember bool `form:"remember"`
|
Remember bool `form:"remember"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ func (f *AddEmailForm) Validate(ctx *macaron.Context, errs binding.Errors) bindi
|
||||||
|
|
||||||
type ChangePasswordForm struct {
|
type ChangePasswordForm struct {
|
||||||
OldPassword string `form:"old_password" binding:"Required;MinSize(1);MaxSize(255)"`
|
OldPassword string `form:"old_password" binding:"Required;MinSize(1);MaxSize(255)"`
|
||||||
Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
|
Password string `form:"password" binding:"Required;MaxSize(255)"`
|
||||||
Retype string `form:"retype"`
|
Retype string `form:"retype"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue