Closed wujianbo00 closed 2 months ago
curl -X 'POST' 'http://localhost:8080/test' -H 'accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -d 'birth=2024-01-01%2012%3A00%3A00' 代码示例 type MyTime time.Time type ReqTime struct { Birthday MyTime json:"birth" form:"birth" //MyTime已经重写UnmarshalJSON解析字符串 } func Test(ctx context.Context, c *app.RequestContext) { var req ReqTime c.BindAndValidate(&req) // v0.9.0 Birthday是空的。换成v0.6.2就正常了 c.BindForm(&req) // v0.9.0 Birthday也是空的 }
json:"birth" form:"birth"
This issue has been marked as invalid question, please give more information by following the issue template. The issue will be closed in 1 days if no further activity occurs.
issue
curl -X 'POST' 'http://localhost:8080/test' -H 'accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -d 'birth=2024-01-01%2012%3A00%3A00' 代码示例 type MyTime time.Time type ReqTime struct { Birthday MyTime
json:"birth" form:"birth"
//MyTime已经重写UnmarshalJSON解析字符串 } func Test(ctx context.Context, c *app.RequestContext) { var req ReqTime c.BindAndValidate(&req) // v0.9.0 Birthday是空的。换成v0.6.2就正常了 c.BindForm(&req) // v0.9.0 Birthday也是空的 }