Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator interface {
// Register custom modifier.
RegisterModifier(name string, fn func(in string, param ...string) (out string)) error
// Modify struct field value according to modifier tag.
// Param `data` should be a pointer.
Modify(data interface{}) error
// Register custom validator.
RegisterValidator(name string, fn func(value interface{}, param ...string) (ok bool)) error
// Register error message handler.
RegisterValidatorError(name string, fn func(field string, param ...string) (msg error)) error
// Validate struct field value according to validator tag.
// Param `data` should be a pointer.
Validate(data interface{}) error
}
Validator is validating interface.
See usage example in example folder.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package playground is a wrapper of the original "github.com/go-playground/validator" and "github.com/go-playground/mold" library.
|
Package playground is a wrapper of the original "github.com/go-playground/validator" and "github.com/go-playground/mold" library. |
Click to show internal directories.
Click to hide internal directories.