// Copyright 2014 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packageauthimport("github.com/Unknwon/macaron""github.com/macaron-contrib/binding")typeAuthenticationFormstruct{Idint64`form:"id"`Typeint`form:"type"`AuthNamestring`form:"name" binding:"Required;MaxSize(50)"`Domainstring`form:"domain"`Hoststring`form:"host"`Portint`form:"port"`UseSSLbool`form:"usessl"`BaseDNstring`form:"base_dn"`Attributesstring`form:"attributes"`Filterstring`form:"filter"`MsAdSAstring`form:"ms_ad_sa"`IsActivedbool`form:"is_actived"`SmtpAuthstring`form:"smtpauth"`SmtpHoststring`form:"smtphost"`SmtpPortint`form:"smtpport"`Tlsbool`form:"tls"`AllowAutoRegisterbool`form:"allowautoregister"`}func(f*AuthenticationForm)Validate(ctx*macaron.Context,errsbinding.Errors)binding.Errors{returnvalidate(errs,ctx.Data,f,ctx.Locale)}