Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateFullName ¶
func ValidateFullName(fl validator.FieldLevel) bool
ValidateFullName implements validator.Func
Types ¶
type ArticleForm ¶
type ArticleForm struct{}
ArticleForm ...
func (ArticleForm) Content ¶
func (f ArticleForm) Content(tag string, errMsg ...string) (message string)
Content ...
type CreateArticleForm ¶
type CreateArticleForm struct { Title string `form:"title" json:"title" binding:"required,min=3,max=100"` Content string `form:"content" json:"content" binding:"required,min=3,max=1000"` }
CreateArticleForm ...
type DefaultValidator ¶
type DefaultValidator struct {
// contains filtered or unexported fields
}
DefaultValidator ...
func (*DefaultValidator) ValidateStruct ¶
func (v *DefaultValidator) ValidateStruct(obj interface{}) error
ValidateStruct ...
type LoginForm ¶
type LoginForm struct { Email string `form:"email" json:"email" binding:"required,email"` Password string `form:"password" json:"password" binding:"required,min=3,max=50"` }
LoginForm ...
type RegisterForm ¶
type RegisterForm struct { Name string `form:"name" json:"name" binding:"required,min=3,max=20,fullName"` //fullName rule is in validator.go Email string `form:"email" json:"email" binding:"required,email"` Password string `form:"password" json:"password" binding:"required,min=3,max=50"` }
RegisterForm ...
type Token ¶
type Token struct {
RefreshToken string `form:"refresh_token" json:"refresh_token" binding:"required"`
}
Token ...
Click to show internal directories.
Click to hide internal directories.