Skip to content
This repository was archived by the owner on Jan 14, 2022. It is now read-only.

Commit 1f6400c

Browse files
committed
Return validation errors also when Content-Type is empty (closes #6)
1 parent cb6c28a commit 1f6400c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

binding.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func Bind(req *http.Request, userStruct FieldMapper) Errors {
4141
return Form(req, userStruct)
4242
} else {
4343
errs.Add([]string{}, ContentTypeError, "Empty Content-Type")
44+
errs = append(errs, Validate(req, userStruct)...)
4445
}
4546
} else {
4647
errs.Add([]string{}, ContentTypeError, "Unsupported Content-Type")

0 commit comments

Comments
 (0)