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
The validator sees no difference between an additional field of type "struct" and embedded structures. This complicates further post-processing and forces you to pre-validate each structure and then merge the results.
Is there any way to correct this behavior? For example, by adding an additional tag.
GroupA: Key: 'GroupA.Admin.Name' Error:Field validation for 'Name' failed on the 'required' tag
GroupB: Key: 'GroupB.User.Name' Error:Field validation for 'Name' failed on the 'required' tag
But for "GroupB" the key "GroupB.Name" is expected.
The text was updated successfully, but these errors were encountered:
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
The validator sees no difference between an additional field of type "struct" and embedded structures. This complicates further post-processing and forces you to pre-validate each structure and then merge the results.
Is there any way to correct this behavior? For example, by adding an additional tag.
Code sample, to showcase or reproduce:
Output
But for "GroupB" the key "GroupB.Name" is expected.
The text was updated successfully, but these errors were encountered: