-
Notifications
You must be signed in to change notification settings - Fork 546
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
绑定与校验设置默认值什么时候生效, 我在json body设置有值, 但是会被默认值覆盖 #1088
Comments
github-actions
bot
added
invalid issue
invalid issue (not related to Hertz or described in document or not enough information provided)
and removed
invalid issue
invalid issue (not related to Hertz or described in document or not enough information provided)
labels
Apr 12, 2024
crosstime1986
changed the title
绑定与校验设置默认值什么时候生效, 我在json body设置有值, 但是会被默认值覆盖
绑定与校验设置默认值什么时候生效, 我在json body设置有值, 但是会被默认值覆盖
Apr 12, 2024
cc @FGYFFFF ,帮看下这个 case ,感觉不应该。 |
代码中错误分配了优先级;修复正在合码中 https://github.com/cloudwego/hertz/pull/1056; 抱拳了 |
@crosstime1986 已合入,请 go get develop 分支测试一下 |
好的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
我在方法中使用绑定和验证的方法, 在req struct 中某个字段设置默认值, 实际上我请求json body 后, 我请求的值被默认值覆盖了。想请教一下有什么解决方法?
To Reproduce
menu.pb.go
**Hertz version: **
v0.8.1
** Environment: **
The text was updated successfully, but these errors were encountered: