Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateName ¶
func ValidateName(fl validator.FieldLevel) bool
ValidateName implements validator.Func
Types ¶
type DefaultValidator ¶
type DefaultValidator struct {
// contains filtered or unexported fields
}
DefaultValidator ...
func (*DefaultValidator) ValidateStruct ¶
func (v *DefaultValidator) ValidateStruct(obj interface{}) error
ValidateStruct ...
type LoginFormValidator ¶
type LoginFormValidator struct{}
func (LoginFormValidator) Email ¶
func (f LoginFormValidator) Email(tag string, errMsg ...string) (message string)
Email ...
func (LoginFormValidator) ErrorHandler ¶
func (f LoginFormValidator) ErrorHandler(err error) string
func (LoginFormValidator) Password ¶
func (f LoginFormValidator) Password(tag string) (message string)
Password ...
type RegisterForm ¶
type RegisterForm struct { Name string `form:"name" json:"name" binding:"required,min=3,max=20,name"` Email string `form:"email" json:"email" binding:"required,email"` Password string `form:"password" json:"password" binding:"required,min=3,max=50,eqfield=ConfirmPassword"` ConfirmPassword string `form:"confirm_password" json:"confirm_password" binding:"required,min=3,max=50"` }
type RegisterFormValidator ¶
type RegisterFormValidator struct{}
func (RegisterFormValidator) Email ¶
func (f RegisterFormValidator) Email(tag string, errMsg ...string) (message string)
Email ...
func (RegisterFormValidator) ErrorHandler ¶
func (f RegisterFormValidator) ErrorHandler(err error) string
func (RegisterFormValidator) Name ¶
func (f RegisterFormValidator) Name(tag string, errMsg ...string) (message string)
func (RegisterFormValidator) Password ¶
func (f RegisterFormValidator) Password(tag string) (message string)
Password ...
Click to show internal directories.
Click to hide internal directories.