summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-07-01 15:48:29 -0400
committerLauris BH <lauris@nix.lv>2017-07-01 22:48:29 +0300
commitfea902adc8a6e94646e621a974258417f3d68914 (patch)
treee547d9c9778c9e4514e6836bc835d36ac64e7448 /modules
parent678fec3f6a51beee4f9c7580e51a99170ba24568 (diff)
downloadgitea-fea902adc8a6e94646e621a974258417f3d68914.tar.gz
gitea-fea902adc8a6e94646e621a974258417f3d68914.zip
Check for valid renamed usernames (#2077)
* Check for valid renamed usernames * Integration test * Test for username with space * Make name field required
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/user_form.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go
index f4234b04a9..3c8ebf725b 100644
--- a/modules/auth/user_form.go
+++ b/modules/auth/user_form.go
@@ -100,7 +100,7 @@ func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding
// UpdateProfileForm form for updating profile
type UpdateProfileForm struct {
- Name string `binding:"OmitEmpty;MaxSize(35)"`
+ Name string `binding:"Required;AlphaDashDot;MaxSize(35)"`
FullName string `binding:"MaxSize(100)"`
Email string `binding:"Required;Email;MaxSize(254)"`
KeepEmailPrivate bool