mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
fix issue in embeded struct validation for package gvalid
This commit is contained in:
2
os/gres/testdata/data/data.go
vendored
2
os/gres/testdata/data/data.go
vendored
File diff suppressed because one or more lines are too long
2
os/gres/testdata/testdata.go
vendored
2
os/gres/testdata/testdata.go
vendored
File diff suppressed because one or more lines are too long
@ -226,7 +226,7 @@ func Test_CheckStruct(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func Test_CheckStruct_With_Inherit(t *testing.T) {
|
||||
func Test_CheckStruct_With_EmbedObject(t *testing.T) {
|
||||
gtest.C(t, func(t *gtest.T) {
|
||||
type Pass struct {
|
||||
Pass1 string `valid:"password1@required|same:password2#请输入您的密码|您两次输入的密码不一致"`
|
||||
@ -235,7 +235,7 @@ func Test_CheckStruct_With_Inherit(t *testing.T) {
|
||||
type User struct {
|
||||
Id int
|
||||
Name string `valid:"name@required#请输入您的姓名"`
|
||||
Pass Pass
|
||||
Pass
|
||||
}
|
||||
user := &User{
|
||||
Name: "",
|
||||
|
||||
Reference in New Issue
Block a user