validator_translation

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Trans 定义一个全局翻译器T

Functions

func InitTrans

func InitTrans(locale string) (err error)

InitTrans 初始化表单参数验证器的翻译器

func RemoveTopStruct

func RemoveTopStruct(fields map[string]string) string

RemoveTopStruct 将返回的结构体名去除掉,只留下需要的字段名

func ValidateMobile

func ValidateMobile(fl validator.FieldLevel) bool

自定义校验函数

Types

This section is empty.

Jump to

Keyboard shortcuts

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