-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add a feature to customize error messages #39
Comments
Agreed, seeing "zero value" is fine for in-app cases I think, but for end-user programs such as a CLI it can be confusing |
any news regarding this? |
Any news? |
You can try to do the following: validator.ErrMin = validator.TextErr{Err: errors.New("my custom error string")}
err := validator.Valid(2, "min=10")
if err != nil {
fmt.Println(err)
} I think that is applicable for all other errors. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would be great if there's an easy way to customize error messages.
The text was updated successfully, but these errors were encountered: