Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for error message getting name of the parent json tag instead of the field tag when parent json tag is available. #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Mar 20, 2021

Fixes #351
Summary
With the current behavior, if a field of the struct is having any validation error, the error message contains the struct JSON tag name instead of the field name.
With this fix, the error message will have the field name instead of the struct JSON name.

@ghost
Copy link
Author

ghost commented Mar 24, 2021

@asaskevich Please review.

@sergeyglazyrindev
Copy link

Hello guys!
I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back
Link to my repo: create issue there and we'll discuss it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect field name is selected when validating slices
1 participant