mirror of
https://github.com/gofiber/fiber.git
synced 2025-07-08 03:28:34 +00:00
ref: return prev validation comment
This commit is contained in:
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…
x
Reference in New Issue
Block a user