Add Recaptcha functionality to Gitea (#4044)

This commit is contained in:
Fluf 2018-07-05 00:13:05 -04:00 committed by techknowlogick
parent 54fedd4070
commit f035dcd4f2
13 changed files with 163 additions and 15 deletions

View file

@ -22,8 +22,9 @@ func (f *SignInOpenIDForm) Validate(ctx *macaron.Context, errs binding.Errors) b
// SignUpOpenIDForm form for signin up with OpenID
type SignUpOpenIDForm struct {
UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
Email string `binding:"Required;Email;MaxSize(254)"`
UserName string `binding:"Required;AlphaDashDot;MaxSize(35)"`
Email string `binding:"Required;Email;MaxSize(254)"`
GRecaptchaResponse string `form:"g-recaptcha-response"`
}
// Validate valideates the fields