Merge 1c24d1950da99103741b272a718598e73f628273 into 5f4f9643258dc2a65e684b63f12c8d543c936c67

This commit is contained in:
Preetham 2026-05-15 04:18:28 +08:00 committed by GitHub
commit 96e0b31f74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 15 deletions

View File

@ -71,18 +71,18 @@ var Validator StructValidator = &defaultValidator{}
// These implement the Binding interface and can be used to bind the data
// present in the request to struct instances.
var (
JSON = jsonBinding{}
XML = xmlBinding{}
Form = formBinding{}
Query = queryBinding{}
FormPost = formPostBinding{}
FormMultipart = formMultipartBinding{}
ProtoBuf = protobufBinding{}
YAML = yamlBinding{}
Uri = uriBinding{}
Header = headerBinding{}
TOML = tomlBinding{}
Plain = plainBinding{}
JSON = jsonBinding{}
XML = xmlBinding{}
Form = formBinding{}
Query = queryBinding{}
FormPost = formPostBinding{}
FormMultipart = formMultipartBinding{}
ProtoBuf = protobufBinding{}
YAML = yamlBinding{}
Uri = uriBinding{}
Header = headerBinding{}
TOML = tomlBinding{}
Plain = plainBinding{}
BSON BindingBody = bsonBinding{}
)

View File

@ -27,12 +27,12 @@ func (err SliceValidationError) Error() string {
}
var b strings.Builder
for i := range len(err) {
if err[i] != nil {
for i, e := range err {
if e != nil {
if b.Len() > 0 {
b.WriteString("\n")
}
b.WriteString("[" + strconv.Itoa(i) + "]: " + err[i].Error())
b.WriteString("[" + strconv.Itoa(i) + "]: " + e.Error())
}
}
return b.String()