Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() func(val string, field reflect.StructField, cfg interface{}) error
New returns a validation function to be applied on all flag struct fields of your command tree. It makes use of a singleton validator object, not exposed for customizations. If you want to add some validations or make any other customizations on the validator, use NewWith(custom) method.
func NewWith ¶
func NewWith(custom *validator.Validate) func(val string, field reflect.StructField, cfg interface{}) error
NewWith returns a validation function to be applied on all flag struct fields. It takes a go-playground/validator object (meant to be used as a singleton), on which the user can prealably register any custom validation routines.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package govalidator adds support for govalidator library.
|
Package govalidator adds support for govalidator library. |
Click to show internal directories.
Click to hide internal directories.