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
I have looked at the examples provided that may showcase my question here?
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
When you have a map with struct values, it looks there is no way to validate both the keys and the struct, you can only validate the keys OR the struct.
Code sample, to showcase or reproduce:
This works as expected, returning a validation error because Name is required in Author.
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
When you have a map with struct values, it looks there is no way to validate both the
keys
and the struct, you can only validate the keys OR the struct.Code sample, to showcase or reproduce:
This works as expected, returning a validation error because
Name
is required inAuthor
.Validation error: Key: 'Book.RelatedAuthors[12345].Name' Error:Field validation for 'Name' failed on the 'required' tag
This validates successfully, even if
Name
is requiredValidation successful
The only difference between the two testcases is:
The text was updated successfully, but these errors were encountered: