mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-20 00:02:16 +08:00
upgrade validator version to v9
This commit is contained in:
parent
65a6dd46a5
commit
22b63bec45
@ -8,7 +8,7 @@ import (
|
||||
"reflect"
|
||||
"sync"
|
||||
|
||||
"gopkg.in/go-playground/validator.v8"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
)
|
||||
|
||||
type defaultValidator struct {
|
||||
@ -30,8 +30,8 @@ func (v *defaultValidator) ValidateStruct(obj interface{}) error {
|
||||
|
||||
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")
|
||||
})
|
||||
}
|
||||
|
||||
|
10
vendor/vendor.json
vendored
10
vendor/vendor.json
vendored
@ -97,11 +97,11 @@
|
||||
"revisionTime": "2017-03-08T15:04:45Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "39V1idWER42Lmcmg2Uy40wMzOlo=",
|
||||
"comment": "v8.18.1",
|
||||
"path": "gopkg.in/go-playground/validator.v8",
|
||||
"revision": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c",
|
||||
"revisionTime": "2016-07-18T13:41:25Z"
|
||||
"checksumSHA1": "bghmjNaktOtwAJkf3Vql4cofS3M=",
|
||||
"comment": "v9.4.0",
|
||||
"path": "gopkg.in/go-playground/validator.v9",
|
||||
"revision": "fb68f39656d7ebf8aa339ad4917aa0c260ecc237",
|
||||
"revisionTime": "2017-06-12T05:26:53Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "12GqsW8PiRPnezDDy0v4brZrndM=",
|
||||
|
Loading…
x
Reference in New Issue
Block a user