From fa241efa6d5e934f599e43714e970fa48c9a0f47 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 15 Oct 2014 11:19:20 -0400 Subject: Use binding middleware --- modules/auth/auth_form.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/auth/auth_form.go') diff --git a/modules/auth/auth_form.go b/modules/auth/auth_form.go index cb9da5df..e9789634 100644 --- a/modules/auth/auth_form.go +++ b/modules/auth/auth_form.go @@ -6,9 +6,7 @@ package auth import ( "github.com/Unknwon/macaron" - "github.com/macaron-contrib/i18n" - - "github.com/gogits/gogs/modules/middleware/binding" + "github.com/macaron-contrib/binding" ) type AuthenticationForm struct { @@ -31,6 +29,6 @@ type AuthenticationForm struct { AllowAutoRegister bool `form:"allowautoregister"` } -func (f *AuthenticationForm) Validate(ctx *macaron.Context, errs *binding.Errors, l i18n.Locale) { - validate(errs, ctx.Data, f, l) +func (f *AuthenticationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { + return validate(errs, ctx.Data, f, ctx.Locale) } -- cgit v1.2.3