Skip to content

Commit f5cb803

Browse files
authored
Merge pull request #2 from netr/dev
remove error catch on BodyParser when calling Validate() on a struct.…
2 parents 21534f3 + 50167a3 commit f5cb803

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

validate.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ import (
1616
type CanValidate struct{}
1717

1818
func (v CanValidate) Validate(c *fiber.Ctx, req interface{}) *ValidationError {
19-
err := c.BodyParser(req)
20-
if err != nil {
21-
return &ValidationError{error: err}
22-
}
19+
_ = c.BodyParser(req)
2320

2421
if vErr := validateRequest(req); vErr != nil {
2522
return &ValidationError{bag: vErr}

0 commit comments

Comments
 (0)