validator

package
v0.0.0-...-8d59c21 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(data interface{}) []string

Verify 验证一个结构体

func VerifyField

func VerifyField(field interface{}, tag string) string

VerifyField 验证单个变量

func VerifyPost

func VerifyPost(c *gin.Context, rules map[string]string) []string

VerifyPost 验证POST请求表单 rules 为验证规则,字段为key,规则为值, 例如:{"username": "required", "email": "required,email"}

Types

This section is empty.

Jump to

Keyboard shortcuts

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