From 4b88c96645a243cffc03bbedb5d6ffab32b810d6 Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Mon, 13 Feb 2023 14:47:44 -0600 Subject: [PATCH] Use proper error message on bind errors. --- validate/validate.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validate/validate.go b/validate/validate.go index ae6ad5d..b204ce6 100644 --- a/validate/validate.go +++ b/validate/validate.go @@ -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()) } -- 2.45.2