mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 03:07:45 +08:00
fix issue in embeded struct validation for package gvalid
This commit is contained in:
parent
c056fd2a06
commit
5999f22f76
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: "",
|
||||
|
Loading…
Reference in New Issue
Block a user