Ant

package module
v0.0.0-...-6df0be2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Ant validatorParity = "ant"
View Source
const Custom validatorParity = "custom"

Variables

This section is empty.

Functions

func NewCustomRule

func NewCustomRule(ruleName string, fun func(value string) error)

Types

type Error

type Error struct {
	Is   bool
	Data []errorData
}

type Validator

type Validator struct {
	Parity validatorParity
}

func New

func New(validator Validator) Validator

func (*Validator) String

func (v *Validator) String(value string, rule string) Error

String 字符串检查

func (*Validator) Struct

func (v *Validator) Struct(s interface{}, filePath ...string) Error

Struct 结构体检查

func (*Validator) Type

func (v *Validator) Type(t interface{}, value interface{}, rule string)

Jump to

Keyboard shortcuts

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