Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf interface{}
Conf is just an empty interface mask. This is useful for usage clarity.
type FieldValidation ¶
FieldValidation must have a Tag and Fn set. During the validation process of a Conf, each FieldValidation will be processed against each Conf field that has a matching Tag. When a Conf field has a matching Tag, then the custom Fn is processed. Docs: https://pkg.go.dev/github.com/go-playground/validator/v10#hdr-Custom_Validation_Functions Example: https://github.com/go-playground/validator/blob/master/_examples/custom-validation/main.go
type StructValidation ¶
type StructValidation struct {
Fn func(sl validator.StructLevel)
}
StructValidation must have a Fn set. During the validation process of a Conf, each StructValidation will be processed against the entire Conf struct, by processing the custom Fn. Example: https://github.com/go-playground/validator/blob/master/_examples/struct-level/main.go