mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 18:22:23 +08:00
update readme for adding binding about skip validate
This commit is contained in:
parent
5636afe02d
commit
7f3d687387
@ -571,6 +571,9 @@ $ curl -v -X POST \
|
|||||||
{"error":"Key: 'Login.Password' Error:Field validation for 'Password' failed on the 'required' tag"}
|
{"error":"Key: 'Login.Password' Error:Field validation for 'Password' failed on the 'required' tag"}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Skip validate**
|
||||||
|
When running the above example using the above the `curl` command, it returns error. Because the example use `binding:"required"` for `Password`. If use `binding:"-"` for `Password`, then it will not return error when running the above example again.
|
||||||
|
|
||||||
### Custom Validators
|
### Custom Validators
|
||||||
|
|
||||||
It is also possible to register custom validators. See the [example code](examples/custom-validation/server.go).
|
It is also possible to register custom validators. See the [example code](examples/custom-validation/server.go).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user