Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

嵌套指针结构体无法进行验证 #1921

Closed
jianyestudy opened this issue Jun 21, 2022 · 0 comments
Closed

嵌套指针结构体无法进行验证 #1921

jianyestudy opened this issue Jun 21, 2022 · 0 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version. inactive

Comments

@jianyestudy
Copy link

jianyestudy commented Jun 21, 2022

1. What version of Go and system type/arch are you using?

go 1.17 ubuntu

2. What version of GoFrame are you using?

v2.1.0-rc4

3. Can this issue be re-produced with the latest release?

yes

最小可运行代码:

package main

import (
	"fmt"
	
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gctx"
)

type SearchReq struct {
	Option *SearchOption `json:"option,omitempty"`
}
type SearchOption struct {
	Size int `v:"max:100"`
}

func main() {
	var (
		ctx = gctx.New()
		req = SearchReq{
			Option: &SearchOption{
				Size: 10000,
			},
		}
	)
	err := g.Validator().Data(req).Run(ctx)
	fmt.Println(err)
}
@gqcn gqcn added bug It is confirmed a bug, but don't worry, we'll handle it. wip labels Aug 24, 2022
gqcn added a commit that referenced this issue Aug 24, 2022
@gqcn gqcn added done This issue is done, which may be release in next version. and removed wip labels Aug 24, 2022
@gqcn gqcn closed this as completed Aug 24, 2022
gqcn added a commit that referenced this issue Aug 26, 2022
* CI updates

* fix issue in OpenAPI json marshaling of embedded struct definition; improve command gen service

* improve logging content printing for internal log

* fix issue #1921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version. inactive
Projects
None yet
Development

No branches or pull requests

2 participants