Closed plarsson closed 1 year ago
@plarsson yes the behaviour was corrected in #1157 and #1122 before that.
I have made special concessions for the required
tag as I can understand and appreciate the confusion, especially coming from other languages where a variable can be uninitialized, however the dive
tag is clearly documented to only work with arrays, slices and maps.
ok thanks for the confirmation! We will adjust on our side.
Package version eg. v9, v10:
v10.15.3
Issue, Question or Enhancement:
In v10.15.3, we ran into some panic messages saying:
dive error! can't dive on a non-slice or map.
I checked and discovered that we mistakenly tagged some structs withdive
. Dive is only needed and supported on slices and maps, correct?However version v10.15.1 didn't panic with
dive
configured on a struct type.I think the behaviour of dive was "corrected" somehow by: https://github.com/go-playground/validator/commit/9b7c4de75b64b21fe881f0376974c2e32188ed3d?