Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultStruct ¶
func DefaultStruct(o interface{})
DefaultStruct will set all defaults value to fields that have a default set this function is to call before filling the struct with form values
Types ¶
type FieldError ¶
type FieldError struct { FieldPath string `json:"field_path"` FieldName string `json:"field_name"` ErrorString string `json:"error_string"` }
func SanitizeStruct ¶
func SanitizeStruct(o interface{}, path_prefix string) []FieldError
SanitizeStruct will sanitize all fields of a struct (o must be a pointer to this struct) return an array of string, one string per error
Click to show internal directories.
Click to hide internal directories.