diff --git a/util/gvalid/gvalid_check.go b/util/gvalid/gvalid_check.go index bfdc8915c..1c5c4e3e1 100644 --- a/util/gvalid/gvalid_check.go +++ b/util/gvalid/gvalid_check.go @@ -123,7 +123,8 @@ func doCheck(key string, value interface{}, rules string, messages interface{}, } // It converts value to string and then does the validation. var ( - val = strings.TrimSpace(gconv.String(value)) + // Do not trim it as the space is also part of the value. + val = gconv.String(value) data = make(map[string]string) errorMsgs = make(map[string]string) )