Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrBuildFieldMap ¶
GetOrBuildFieldMap returns a cached field map or builds and caches it if not present
func ValidateStruct ¶
func ValidateStruct(s interface{}) map[string]FieldErrorDetail
ValidateStruct validates a struct and returns a map of field errors
Types ¶
type FieldErrorDetail ¶
type FieldErrorDetail struct {
Validator string `json:"validator"`
Message string `json:"message"`
}
FieldErrorDetail represents the tag and message for a field error
Click to show internal directories.
Click to hide internal directories.