Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultChoicesSeparator = ","
View Source
var DefaultMessages = map[string]string{
"InvalidField": "This field is invalid.",
"InvalidFormat": "This field has an invalid format (%v).",
"InvalidMinString": "This field must have at least %v characters.",
"InvalidMaxString": "This field must not have more than %v characters.",
"InvalidMinNumber": "This field must be bigger than %v.",
"InvalidMaxNumber": "This field must be smaller than %v.",
"InvalidMinList": "This field must have at least %v elements.",
"InvalidMaxList": "This field must not have more than %v elements.",
"RequiredField": "This field is required.",
"InvalidChoice": "This field has an invalid choice (%v). The valid choices are (%v)",
}
View Source
var DefaultSeparator = ";"
View Source
var DefaultTagName = "validations"
Functions ¶
Types ¶
type ValidationError ¶
func (ValidationError) Error ¶
func (vr ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.