req := NewRequestWithValues(t, "POST", "/user/sign_up", map[string]string{
"user_name": "exampleUser",
"email": "exampleUser@example.com",
- "password": "examplePassword",
- "retype": "examplePassword",
+ "password": "examplePassword!1",
+ "retype": "examplePassword!1",
})
MakeRequest(t, req, http.StatusFound)
ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplSignUp, &form)
return
}
+ if !password.IsComplexEnough(form.Password) {
+ ctx.Data["Err_Password"] = true
+ ctx.RenderWithErr(ctx.Tr("form.password_complexity"), tplSignUp, &form)
+ return
+ }
u := &models.User{
Name: form.UserName,