File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,18 +71,18 @@ var Validator StructValidator = &defaultValidator{}
7171// These implement the Binding interface and can be used to bind the data
7272// present in the request to struct instances.
7373var (
74- JSON = jsonBinding {}
75- XML = xmlBinding {}
76- Form = formBinding {}
77- Query = queryBinding {}
78- FormPost = formPostBinding {}
79- FormMultipart = formMultipartBinding {}
80- ProtoBuf = protobufBinding {}
81- YAML = yamlBinding {}
82- Uri = uriBinding {}
83- Header = headerBinding {}
84- TOML = tomlBinding {}
85- Plain = plainBinding {}
74+ JSON = jsonBinding {}
75+ XML = xmlBinding {}
76+ Form = formBinding {}
77+ Query = queryBinding {}
78+ FormPost = formPostBinding {}
79+ FormMultipart = formMultipartBinding {}
80+ ProtoBuf = protobufBinding {}
81+ YAML = yamlBinding {}
82+ Uri = uriBinding {}
83+ Header = headerBinding {}
84+ TOML = tomlBinding {}
85+ Plain = plainBinding {}
8686 BSON BindingBody = bsonBinding {}
8787)
8888
Original file line number Diff line number Diff line change @@ -28,13 +28,13 @@ func (err SliceValidationError) Error() string {
2828
2929 var b strings.Builder
3030 for i , e := range err {
31- if e != nil {
32- if b .Len () > 0 {
33- b .WriteString ("\n " )
31+ if e != nil {
32+ if b .Len () > 0 {
33+ b .WriteString ("\n " )
34+ }
35+ b .WriteString ("[" + strconv .Itoa (i ) + "]: " + e .Error ())
3436 }
35- b .WriteString ("[" + strconv .Itoa (i ) + "]: " + e .Error ())
3637 }
37- }
3838 return b .String ()
3939}
4040
You can’t perform that action at this time.
0 commit comments