From fea902adc8a6e94646e621a974258417f3d68914 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Sat, 1 Jul 2017 15:48:29 -0400 Subject: Check for valid renamed usernames (#2077) * Check for valid renamed usernames * Integration test * Test for username with space * Make name field required --- modules/auth/user_form.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/auth/user_form.go') 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 -- cgit v1.2.3