upgrade validator version to v9 (#1015)

* upgrade validator version to v9

* Update vendor.json

* Update go.mod

* Update go.sum

* fix

* fix

* fix bug

* Update binding_test.go

* Update validate_test.go

* Update go.sum

* Update go.mod

* Update go.sum

* Update go.mod

* Update go.sum
This commit is contained in:
thinkerou
2019-09-05 21:39:56 +08:00
committed by GitHub
parent c3f7fc399a
commit 1acb3fb30a
6 changed files with 73 additions and 42 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import (
"reflect"
"sync"
"gopkg.in/go-playground/validator.v8"
"gopkg.in/go-playground/validator.v9"
)
type defaultValidator struct {
@@ -45,7 +45,7 @@ func (v *defaultValidator) Engine() interface{} {
func (v *defaultValidator) lazyinit() {
v.once.Do(func() {
config := &validator.Config{TagName: "binding"}
v.validate = validator.New(config)
v.validate = validator.New()
v.validate.SetTagName("binding")
})
}