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

Field name included in custom error messages #487

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jorgefuertes
Copy link

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

The error strings are different from the provided error messages to the custom error messages. First ones included the field name. When using this feature from a front application, for example, with the custom error message you don't know which field is referred.

Go validator error message:
password: does not validate as stringlength(3|50)

Custom error messages:
Should have between 3 to 50 chars.

While it should be:
password: Should have between 3 to 50 chars.

I've modified the test to be OK with the new custom messages.

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.

None yet

1 participant