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
We should add an option of whether to use the full display name or not in the error message. This because in some cases showing the full display name makes the errors less user friendly. Especially if they are being shown to non developers. Also not having this option makes it troublesome if one would like to use a custom display name using SetDisplayNameTag(tagName).
Suggestion
defaultValidator := validator.Default()
defaultValidator.UseFullDisplayNameInError(false) // default is true
The text was updated successfully, but these errors were encountered:
typerandom
changed the title
Option to only full display name or not in error message
Option to show full display name or not in error message
May 16, 2015
Structs often already have json tags, I think it is useful to have an option to pick json tags if any as display names and tagName in SetDisplayNameTag will be used in case there're both options.
Yes, that is a good idea. Though I wonder if it's just easier if SetDisplayNameTag would accept an array and that would indicate the order in which display name tags would be read. I.e:
We should add an option of whether to use the full display name or not in the error message. This because in some cases showing the full display name makes the errors less user friendly. Especially if they are being shown to non developers. Also not having this option makes it troublesome if one would like to use a custom display name using SetDisplayNameTag(tagName).
Suggestion
The text was updated successfully, but these errors were encountered: