Skip to content

Commit

Permalink
doc: update readme for adding binding about skip validate (#1359)
Browse files Browse the repository at this point in the history
* update readme for adding binding about skip validate

* update readme for adding binding about skip validate
  • Loading branch information
thinkerou authored and appleboy committed May 31, 2018
1 parent c2f083f commit caf3e35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -572,6 +572,10 @@ $ curl -v -X POST \
{"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

It is also possible to register custom validators. See the [example code](examples/custom-validation/server.go).
Expand Down

0 comments on commit caf3e35

Please sign in to comment.