We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
客户端参数 { id:20 sign:90cb901a631a3260c59d90724e893da9 timestamp:1681459261 role_id:3 } 注意:不是表单key value格式,是整个json数据 后端处理 type ArticleCommentLikeForm struct { ID int32 form:"id" alias:"ID" binding:"required" Timestamp int32 form:"timestamp" alias:"文章ID" binding:"required" Sign string form:"sign" alias:"文章ID" binding:"required" RoleId int32 form:"role_id" alias:"角色ID" binding:"required" } var param ArticleCommentLikeForm err := ctx.ShouldBind(¶m); 获取不到RoleId的值
The text was updated successfully, but these errors were encountered:
Is this issue mean a bug of gin or a wrong example of some document(Which document should be displayed here)?
Sorry, something went wrong.
duplicate of gin-gonic/gin#3570
No branches or pull requests
客户端参数
{
id:20
sign:90cb901a631a3260c59d90724e893da9
timestamp:1681459261
role_id:3
}
注意:不是表单key value格式,是整个json数据
后端处理
type ArticleCommentLikeForm struct {
ID int32 form:"id" alias:"ID" binding:"required"
Timestamp int32 form:"timestamp" alias:"文章ID" binding:"required"
Sign string form:"sign" alias:"文章ID" binding:"required"
RoleId int32 form:"role_id" alias:"角色ID" binding:"required"
}
var param ArticleCommentLikeForm
err := ctx.ShouldBind(¶m);
获取不到RoleId的值
The text was updated successfully, but these errors were encountered: