TaylorLi
TaylorLi
> I use result here: [gin-gonic/gin#1824 (comment)](https://github.com/gin-gonic/gin/issues/1824#issuecomment-475968345) but I wonder whether there is a better solution ``` type updateAccountRequest struct { ID int64 `uri:"id" binding:"required,min=1"` Balance int64 `json:"balance"` } func...
> @TaylorDurden thanks for help. However, if I recall correctly, this may not work. > @TaylorDurden thanks for help. However, if I recall correctly, this may not work. https://github.com/TaylorDurden/go-simple-bank/pull/4 You...
@chengr4 I guess that maybe you were testing a 400 Bad Request to the API client without currency field. If you mark the `currency` field not required, this field won't...
> @TaylorDurden But I usually want to validate it Then you should use another struct for this param...since it is from request body and use ShouldBindJSON to parse & validate...