Skip to content

Commit a142ed7

Browse files
committed
✅ test: add more assert check for test issues #213
1 parent 0e59d42 commit a142ed7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

issues_test.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,8 @@ func TestIssues_213(t *testing.T) {
12741274
f := &Form{}
12751275
v := validate.Struct(f) // nolint:varnamelen
12761276
assert.False(t, v.Validate())
1277-
fmt.Println(v.Errors)
1277+
// fmt.Println(v.Errors)
1278+
assert.StrContains(t, v.Errors.String(), "Data is required to not be empty")
12781279

12791280
f = &Form{
12801281
Data: []Person{
@@ -1283,7 +1284,8 @@ func TestIssues_213(t *testing.T) {
12831284
}
12841285
v = validate.Struct(f) // nolint:varnamelen
12851286
assert.False(t, v.Validate())
1286-
fmt.Println(v.Errors)
1287+
// fmt.Println(v.Errors)
1288+
assert.StrContains(t, v.Errors.String(), "age is required to not be empty")
12871289
}
12881290

12891291
// https://github.com/gookit/validate/issues/217

0 commit comments

Comments
 (0)