summaryrefslogtreecommitdiffstats
path: root/modules/auth/user_form.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-13 10:05:18 -0400
committerUnknwon <u@gogs.io>2015-09-13 10:05:18 -0400
commite5ed5904c62d9a618cb6f4ad852b021a02c3481e (patch)
treeb0c91a2e532899a1f8f0707bd0df795ab65080d7 /modules/auth/user_form.go
parent1fa5b6711b1540415511cd33d17a12170ab69ba6 (diff)
downloadgitea-e5ed5904c62d9a618cb6f4ad852b021a02c3481e.tar.gz
gitea-e5ed5904c62d9a618cb6f4ad852b021a02c3481e.zip
#1606 GUI bug while adding ldap user
Diffstat (limited to 'modules/auth/user_form.go')
-rw-r--r--modules/auth/user_form.go22
1 files changed, 16 insertions, 6 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go
index dde403c26e..5259e1ee35 100644
--- a/modules/auth/user_form.go
+++ b/modules/auth/user_form.go
@@ -58,12 +58,10 @@ func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) bindin
// \/ \/
type RegisterForm struct {
- UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
- Email string `binding:"Required;Email;MaxSize(254)"`
- Password string `binding:"Required;MaxSize(255)"`
- Retype string
- LoginType string
- LoginName string
+ UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
+ Email string `binding:"Required;Email;MaxSize(254)"`
+ Password string `binding:"Required;MaxSize(255)"`
+ Retype string
}
func (f *RegisterForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
@@ -80,6 +78,18 @@ func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding
return validate(errs, ctx.Data, f, ctx.Locale)
}
+type AdminCrateUserForm struct {
+ UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
+ Email string `binding:"Required;Email;MaxSize(254)"`
+ Password string `binding:"MaxSize(255)"`
+ LoginType string
+ LoginName string
+}
+
+func (f *AdminCrateUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
+ return validate(errs, ctx.Data, f, ctx.Locale)
+}
+
// __________________________________________.___ _______ ________ _________
// / _____/\_ _____/\__ ___/\__ ___/| |\ \ / _____/ / _____/
// \_____ \ | __)_ | | | | | |/ | \/ \ ___ \_____ \