validator

package
v0.0.5-beta Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func RequestParser

func RequestParser(ctx echo.Context, params any) error

RequestParser 请求解析验证

func Validator

func Validator() *validator.Validate

func ValidatorMaps

func ValidatorMaps(ctx echo.Context, params map[string]any, rules ValidatorRule) error

func ValidatorStructError

func ValidatorStructError(ctx echo.Context, object any, err error) error

ValidatorStructError 错误处理

Types

type ValidatorRule

type ValidatorRule map[string]ValidatorWarp

type ValidatorWarp

type ValidatorWarp struct {
	Rule        string
	Message     string
	LangMessage string
}

Jump to

Keyboard shortcuts

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