Skip to content

Invalid error messages with validateMap #894

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

Open
dosco opened this issue Feb 6, 2022 · 1 comment · May be fixed by #962
Open

Invalid error messages with validateMap #894

dosco opened this issue Feb 6, 2022 · 1 comment · May be fixed by #962

Comments

@dosco
Copy link

dosco commented Feb 6, 2022

  • [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:

The validation errors look below with validateMap. Multiple values are missing within the error message

Key: '' Error:Field validation for '' failed on the 'email' tag

Code sample, to showcase or reproduce:

@dhairyapunjabi
Copy link

@deankarn This is an issue with validateMap in go-playground/validator, the errors generated (fieldError) there don't have ns or actualNs fields set as the rule map keys and hence the translation of these errors contains empty strings in place where key name should be there. Is this going to be fixed or is there some way to get around this and get a correct translation?

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

Successfully merging a pull request may close this issue.

3 participants