-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Description
Is there a way to validate URL params?
e.g.
r.GET("/:foo/*bar", myFunc)
How can I validate foo and bar?
It would be nice if c.Bind() method could fall back (query params, form params, url params) - maybe introducing a 'url' tag:
type MyParams struct {
Foo string `url:"foo"`
Bar string `url:"bar`
Download bool `form:"dl"`
}
cgarvis, itimofeev, dongshimou, mikestead, fcce and 31 more