Open andresuchitra opened 2 years ago
I raised this as issue, because apparently need to report which fields causing the error.
In current behavior, we only received strconv.ErrSyntax
after calling Struct()
function, thus we can't know the problematic field(s)
I'm trying to understand the problem. How can you even use int type but with string value? Is that something wrong with your example?
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
When using validate tag "gte=0" or "numeric", calling
validate.Struct()
does not returnValidationError
, but strconv.ParseInt error.Code sample, to showcase or reproduce:
Struct that I used: