Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can params be validated? #1172

Closed
stuart-mclaren opened this issue Nov 15, 2017 · 2 comments
Closed

Can params be validated? #1172

stuart-mclaren opened this issue Nov 15, 2017 · 2 comments

Comments

@stuart-mclaren
Copy link

stuart-mclaren commented Nov 15, 2017

Is there a way to use the validator bindings to verify a path parameter's format?

eg, if the id for a delete should be a uuid:

DELETE /foo/<id>

is there a way to make

id := c.Param("id")

trigger the equivalent to this validate call?

validate.Var(id, "uuid")

Thanks.

@ycdesu
Copy link

ycdesu commented Nov 17, 2017

Is this the same as #846?

@thinkerou
Copy link
Member

@stuart-mclaren duplicated #846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants