Skip to content

Commit

Permalink
doc: Update README.zh-CN.md
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere authored Apr 26, 2023
1 parent e01fae9 commit 79adbf3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ func main() {
v.AddRule("age", "max", 99)

if v.Validate() { // validate ok
// safeData := v.SafeData()
userForm := &UserForm{}
v.BindSafeData(userForm)

// do something ...
fmt.Println(userForm.Name)
} else {
fmt.Println(v.Errors) // all error messages
fmt.Println(v.Errors.One()) // returns a random error message text
Expand Down

0 comments on commit 79adbf3

Please sign in to comment.