diff options
author | Peter <peter@smitmail.eu> | 2014-12-17 17:42:54 +0200 |
---|---|---|
committer | Peter <peter@smitmail.eu> | 2014-12-17 17:42:54 +0200 |
commit | b033f2f535ad498ed78da6599d446abe2fd5c27d (patch) | |
tree | 6723f1c29fd32cea03e68717d992984850450ace /modules | |
parent | f34b04cfc09a3bf0d18c7c4d8950869a252f0a28 (diff) | |
download | gitea-b033f2f535ad498ed78da6599d446abe2fd5c27d.tar.gz gitea-b033f2f535ad498ed78da6599d446abe2fd5c27d.zip |
Finish method for having multiple emails/user.
All basics are implemented. Missing are the right (localized) strings
and the page markup could have a look at by a frontend guy.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/auth/user_form.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go index 4dfe2499f1..becd5cbca8 100644 --- a/modules/auth/user_form.go +++ b/modules/auth/user_form.go @@ -97,6 +97,14 @@ func (f *UploadAvatarForm) Validate(ctx *macaron.Context, errs binding.Errors) b return validate(errs, ctx.Data, f, ctx.Locale) } +type AddEmailForm struct { + Email string `form:"email" binding:"Required;Email;MaxSize(50)"` +} + +func (f *AddEmailForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) +} + type ChangePasswordForm struct { OldPassword string `form:"old_password" binding:"Required;MinSize(6);MaxSize(255)"` Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"` |