validator

package
v0.0.0-...-93b8502 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPostParams

func CheckPostParams(c *gin.Context, obj interface{}) error

func CheckQueryParams

func CheckQueryParams(c *gin.Context, obj interface{}) error

func InitValidatorTrans

func InitValidatorTrans(locale string)

func ResponseError

func ResponseError(c *gin.Context, err error)

Types

type Page

type Page struct {
	Page  float64 `form:"page" json:"page" binding:"min=1"`   // 必填,页面值>=1
	Limit float64 `form:"limit" json:"limit" binding:"min=1"` // 必填,每页条数值>=1
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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