Skip to content

Commit

Permalink
upgrade go-validator to v10 for README (gin-gonic#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
flysnoworg authored and ThomasObenaus committed Feb 19, 2020
1 parent eec6a0f commit 3f4df94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ func main() {

To bind a request body into a type, use model binding. We currently support binding of JSON, XML, YAML and standard form values (foo=bar&boo=baz).

Gin uses [**go-playground/validator.v8**](https://github.com/go-playground/validator) for validation. Check the full docs on tags usage [here](http://godoc.org/gopkg.in/go-playground/validator.v8#hdr-Baked_In_Validators_and_Tags).
Gin uses [**go-playground/validator/v10**](https://github.com/go-playground/validator) for validation. Check the full docs on tags usage [here](https://godoc.org/github.com/go-playground/validator#hdr-Baked_In_Validators_and_Tags).

Note that you need to set the corresponding binding tag on all fields you want to bind. For example, when binding from JSON, set `json:"fieldname"`.

Expand Down

0 comments on commit 3f4df94

Please sign in to comment.