Documentation
¶
Index ¶
- func MatchPattern(pattern string, value string) (bool, error)
- func ValidatePattern(pattern string) error
- type Error
- type Result
- func (result *Result) Add(field, message string)
- func (result *Result) AddCode(field, code, message string, vars map[string]string)
- func (result Result) ByField() map[string][]string
- func (result Result) FieldMessages(field string) []string
- func (result Result) Messages() []string
- func (result Result) OK() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchPattern ¶ added in v0.2.3
MatchPattern reports whether value matches pattern from start to end.
func ValidatePattern ¶ added in v0.2.3
ValidatePattern reports whether pattern uses the generated action validation syntax supported by MatchPattern.
Types ¶
type Result ¶
type Result struct {
Errors []Error
}
Result collects validation errors for generated actions.
func (*Result) AddCode ¶ added in v0.13.0
AddCode records a stable validation code with safe default text and vars.
func (Result) FieldMessages ¶
FieldMessages returns messages for one submitted field.
Click to show internal directories.
Click to hide internal directories.