You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ X ] I have looked at the documentation here first?
[ X ] I have looked at the examples provided that may showcase my question here?
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
When using StructPartial(), we should expect all fields specified to be validated. It does not validate struct properties, however, unless you specify the full path to individual fields inside child structs.
2024/07/19 15:26:07 validation full: Key: 'Order.Item.Id' Error:Field validation for 'Id' failed on the 'number' tag
2024/07/19 15:26:07 validation partial: <nil>
2024/07/19 15:26:07 validation partial with path: Key: 'Order.Item.Id' Error:Field validation for 'Id' failed on the 'number' tag
2024/07/19 15:26:07 done.
The text was updated successfully, but these errors were encountered:
Using StructFiltered(), it does go into nested structs. However, it's a bit cumbersome to use. This works and validates all child fields in the child struct regardless of how deeply things are nested:
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
When using StructPartial(), we should expect all fields specified to be validated. It does not validate struct properties, however, unless you specify the full path to individual fields inside child structs.
Code sample, to showcase or reproduce:
Output is as follows:
The text was updated successfully, but these errors were encountered: