diff --git a/Model-validation.md b/Model-validation.md index c83d123..0086019 100644 --- a/Model-validation.md +++ b/Model-validation.md @@ -1,9 +1,9 @@ -Iris does not contain built-in method for validating request data such as "Models". However, you are not limited. In this example we will learn how to use the [**go-playground/validator.v9**](https://github.com/go-playground/validator) for request values validation. +Iris, wisely, not features a builtin data validation. However, you are not limited. In this example we will learn how to use the [**go-playground/validator/v10**](https://github.com/go-playground/validator) for request values validation. -Check the full docs on tags usage [here](http://godoc.org/gopkg.in/go-playground/validator.v9#hdr-Baked_In_Validators_and_Tags). +Check the full docs on tags usage [here](https://pkg.go.dev/github.com/go-playground/validator/v10@v10.2.0?tab=doc). ```sh -$ go get gopkg.in/go-playground/validator.v9 +$ go get github.com/go-playground/validator/v10 ``` 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"`. @@ -16,7 +16,7 @@ import ( "github.com/kataras/iris/v12" - "gopkg.in/go-playground/validator.v9" + "github.com/go-playground/validator/v10" ) // User contains user information.