v8

package
v0.3.5-0...-95db35b Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultResourceCheck

func DefaultResourceCheck(
	v *validator.Validate, topStruct reflect.Value, currentStructOrField reflect.Value,
	field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string,
) bool

DefaultResourceCheck to check resource id in request form

func Enum

func Enum(
	v *validator.Validate, topStruct reflect.Value, currentStructOrField reflect.Value,
	field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string,
) bool

Enum validate the val is in enum type or not, only support string type use like this: `form:"user_type" binding:"required,enum=[01/02/03]"`

func IP

func IP(
	v *validator.Validate, topStruct reflect.Value, currentStructOrField reflect.Value,
	field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string,
) bool

IP validator regexp ip string param

func Mobile

func Mobile(
	v *validator.Validate, topStruct reflect.Value, currentStructOrField reflect.Value,
	field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string,
) bool

Mobile validate mobile string

func RegisterResChk

func RegisterResChk(name string, ic cusVali.ResourceChecker)

RegisterResChk to bind name with checker

Types

This section is empty.

Jump to

Keyboard shortcuts

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