Open cascadetile opened 1 month ago
v10
I would like to point out that StructPartial does not dive into slice of structs
type Order struct { Goods []Good `json:"goods" validate:"required,min=1,max=30,dive"` } type Good struct { ID int `json:"id" validate:"required,gt=0"` Amount float64 `json:"amount" validate:"required,gt=0,max=5"` } err = validate.StructPartial(Order{Goods: []Good{{ID: -1, Amount: -1}}}, "Goods") if err != nil { for _, err := range err.(validator.ValidationErrors) { fmt.Printf("%+v\n", err) } return }
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
I would like to point out that StructPartial does not dive into slice of structs
Code sample, to showcase or reproduce: