Documentation ¶ Index ¶ type Data type Errors type Option type Rule type Validation type Validator Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Data ¶ type Data interface { Get(key string) (val any, exist bool) Set(key string, val any) error } type Errors ¶ type Errors interface { One(key ...string) string Get(key string) map[string]string All() map[string]map[string]string Has(key string) bool } type Option ¶ type Option func(map[string]any) type Rule ¶ type Rule interface { Signature() string // Determine if the validation rule passes. Passes(data Data, val any, options ...any) bool // Get the validation error message. Message() string } type Validation ¶ type Validation interface { Make(data any, rules map[string]string, options ...Option) (Validator, error) AddRules([]Rule) error Rules() []Rule } type Validator ¶ type Validator interface { Bind(ptr any) error Errors() Errors Fails() bool } Source Files ¶ View all Source files validation.go Directories ¶ Show internal Expand all Path Synopsis mocks Click to show internal directories. Click to hide internal directories.