Documentation
¶
Index ¶
- func DisableBindValidation()
- func IsDecimal(s string) bool
- func IsDecimalGt(s, t string) bool
- func IsDecimalGte(s, t string) bool
- func IsDecimalLt(s, t string) bool
- func IsDecimalLte(s, t string) bool
- func IsMobile(s string) bool
- func IsNumberGt0(s string) bool
- func IsNumberGte0(s string) bool
- func RegisterValidation(valid *validator.Validate) error
- func Struct(v any) error
- func StructCtx(ctx context.Context, v any) error
- func ValidDecimalMaxOf(fl validator.FieldLevel) bool
- func ValidDecimalMinOf(fl validator.FieldLevel) bool
- func ValidIsDecimal(fl validator.FieldLevel) bool
- func ValidIsDecimalGt(fl validator.FieldLevel) bool
- func ValidIsDecimalGte(fl validator.FieldLevel) bool
- func ValidIsDecimalLt(fl validator.FieldLevel) bool
- func ValidIsDecimalLte(fl validator.FieldLevel) bool
- func ValidIsMobile(fl validator.FieldLevel) bool
- func ValidNumberGt0(fl validator.FieldLevel) bool
- func ValidNumberGte0(fl validator.FieldLevel) bool
- func Validate(ctx context.Context, v any) error
- func Validator() *validator.Validate
- func Var(v any, tag string) error
- func VarCtx(ctx context.Context, v any, tag string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableBindValidation ¶
func DisableBindValidation()
DisableBindValidation disable bind validation
func RegisterValidation ¶
func Struct ¶
Struct validates a structs exposed fields, and automatically validates nested structs, unless otherwise specified.
func StructCtx ¶
StructCtx validates a structs exposed fields, and automatically validates nested structs, unless otherwise specified and also allows passing of context.Context for contextual validation information.
func ValidDecimalMaxOf ¶
func ValidDecimalMaxOf(fl validator.FieldLevel) bool
func ValidDecimalMinOf ¶
func ValidDecimalMinOf(fl validator.FieldLevel) bool
func ValidIsDecimal ¶ added in v0.0.3
func ValidIsDecimal(fl validator.FieldLevel) bool
ValidIsDecimal 校验是否为字符串 decimal
func ValidIsDecimalGt ¶
func ValidIsDecimalGt(fl validator.FieldLevel) bool
ValidIsDecimalGt 校验是否为字符串数字且大于0
func ValidIsDecimalGte ¶
func ValidIsDecimalGte(fl validator.FieldLevel) bool
ValidIsDecimalGte 校验是否为字符串数字且大于等于0
func ValidIsDecimalLt ¶
func ValidIsDecimalLt(fl validator.FieldLevel) bool
func ValidIsDecimalLte ¶
func ValidIsDecimalLte(fl validator.FieldLevel) bool
func ValidNumberGt0 ¶
func ValidNumberGt0(fl validator.FieldLevel) bool
func ValidNumberGte0 ¶
func ValidNumberGte0(fl validator.FieldLevel) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.