validate

package
v0.0.0-...-054b70b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Validate      *validator.Validate
	ValidateTrans ut.Translator
)

表单验证 https://github.com/go-playground/validator

Functions

This section is empty.

Types

type LoginRequest

type LoginRequest struct {
	Username   string `json:"username" validate:"required,gte=2,lte=50" comment:"用户名"`
	Password   string `json:"password" validate:"required"  comment:"密码"`
	RememberMe bool   `json:"rememberMe" comment:"记住我"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL