Skip to content

Commit

Permalink
Merge pull request #2 from netr/dev
Browse files Browse the repository at this point in the history
remove error catch on BodyParser when calling Validate() on a struct.…
  • Loading branch information
netr committed Apr 9, 2024
2 parents 21534f3 + 50167a3 commit f5cb803
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ import (
type CanValidate struct{}

func (v CanValidate) Validate(c *fiber.Ctx, req interface{}) *ValidationError {
err := c.BodyParser(req)
if err != nil {
return &ValidationError{error: err}
}
_ = c.BodyParser(req)

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

0 comments on commit f5cb803

Please sign in to comment.