From b033f2f535ad498ed78da6599d446abe2fd5c27d Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 17 Dec 2014 17:42:54 +0200 Subject: 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. --- modules/auth/user_form.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules') 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)"` -- cgit v1.2.3