~netlandish/gobwebs

4b88c96645a243cffc03bbedb5d6ffab32b810d6 — Peter Sanchez 1 year, 9 months ago 42c714d
Use proper error message on bind errors.
1 files changed, 3 insertions(+), 1 deletions(-)

M validate/validate.go
M validate/validate.go => validate/validate.go +3 -1
@@ 81,7 81,9 @@ func GetInputErrors(errors []error) InputErrors {
		switch x.(type) {
		case *echo.BindingError:
			err := x.(*echo.BindingError)
			ie[err.Field] = err.Values
			// XXX Need to think this through
			// fname := strings.ToUpper(err.Field[:1]) + err.Field[1:]
			ie[err.Field] = err.HTTPError.Message
		default:
			ie["_global_"] = append(ie["_global_"].([]string), x.Error())
		}