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
+4 -4
View File
@@ -658,9 +658,9 @@ func TestValidationDisabled(t *testing.T) {
assert.NoError(t, err)
}
func TestExistsSucceeds(t *testing.T) {
func TestRequiredSucceeds(t *testing.T) {
type HogeStruct struct {
Hoge *int `json:"hoge" binding:"exists"`
Hoge *int `json:"hoge" binding:"required"`
}
var obj HogeStruct
@@ -669,9 +669,9 @@ func TestExistsSucceeds(t *testing.T) {
assert.NoError(t, err)
}
func TestExistsFails(t *testing.T) {
func TestRequiredFails(t *testing.T) {
type HogeStruct struct {
Hoge *int `json:"foo" binding:"exists"`
Hoge *int `json:"foo" binding:"required"`
}
var obj HogeStruct