mirror of https://github.com/gofiber/fiber.git
ref: return prev validation comment
parent
0e2eae618b
commit
ca9519ae2f
|
@ -34,7 +34,7 @@ app.Post("/", func(c fiber.Ctx) error {
|
||||||
user := new(User)
|
user := new(User)
|
||||||
|
|
||||||
// Works with all bind methods - Body, Query, Form, ...
|
// Works with all bind methods - Body, Query, Form, ...
|
||||||
if err := c.Bind().Body(user); err != nil {
|
if err := c.Bind().Body(user); err != nil { // <- here you receive the validation errors
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue