tool_validator

package
v0.0.0-...-0b46f60 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDate

func CheckDate(str string) bool

CheckDate .

func CheckDatetime

func CheckDatetime(str string) bool

CheckDatetime .

func CheckDevices

func CheckDevices(device string) bool

CheckDevices .

func CheckDomainArray

func CheckDomainArray(arr []string) bool

CheckDomainArray .

func CheckDomainString

func CheckDomainString(str string) bool

CheckDomainString .

func CheckIMei

func CheckIMei(iMei string) bool

CheckIMei .

func CheckIdfa

func CheckIdfa(idfa string) bool

CheckIdfa .

func CheckIp

func CheckIp(ip string) bool

CheckIp .

func CheckMd516

func CheckMd516(md string) bool

CheckMd516 .

func CheckMd516Or32

func CheckMd516Or32(md string) bool

CheckMd516Or32 .

func CheckMd532

func CheckMd532(md string) bool

CheckMd532 .

func CheckStrLengthInGBK

func CheckStrLengthInGBK(str string, minLen, maxLen int) bool

CheckStrLengthInGBK .

func CheckStringLength

func CheckStringLength(str string, minLen, maxLen int) bool

CheckStringLength .

func GetTranslator

func GetTranslator() ut.Translator

func GetValidator

func GetValidator() *v.Validate

func MustRegisterIntValidation

func MustRegisterIntValidation(tag string, f func(int64) bool, callValidationEvenIfNull ...bool)

func MustRegisterStringValidation

func MustRegisterStringValidation(tag string, f func(string) bool, callValidationEvenIfNull ...bool)

func TranslateValidateError

func TranslateValidateError(err error) error

func ValidateStruct

func ValidateStruct(input interface{}) error

Types

type ValidateErrorWithTranslation

type ValidateErrorWithTranslation struct {
	v.ValidationErrorsTranslations
}

func AsValidateError

func AsValidateError(err error) *ValidateErrorWithTranslation

func (ValidateErrorWithTranslation) Error

Jump to

Keyboard shortcuts

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