fix issue in embeded struct validation for package gvalid

This commit is contained in:
John 2020-11-04 20:04:54 +08:00
parent c056fd2a06
commit 5999f22f76
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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: "",