validate

package
v0.0.0-...-7c619cd Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(s any, message map[string]string) (bool, map[string]string)

Validate 返回验证器验证结果错误消息 和 bool (是否验证成功)

func ValidateMap

func ValidateMap(data map[string]any, rules map[string]any, message map[string]string) (bool, map[string]string)

ValidateMap map 验证器

func ValidateMapReturnOneError

func ValidateMapReturnOneError(data map[string]any, rules map[string]any, message map[string]string) (bool, string)

ValidateMapReturnOneError map 验证器

func ValidateTime

func ValidateTime(t types.Time) (bool, string)

ValidateTime 验证时间

func Var

func Var(data string, rule string) (bool, error)

Var 验证器

func VerifyReturnOneError

func VerifyReturnOneError(s any, message map[string]string) (bool, string)

VerifyReturnOneError 返回验证器验证结果错误消息 和 bool (是否验证成功)

func WithValidations

func WithValidations(v validate.Validation)

WithValidations 添加验证器

Types

This section is empty.

Jump to

Keyboard shortcuts

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