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
Would we great to have support for (mustache) expansions/variables in validation messages to do something like "just <x> characters to go for the title
The text was updated successfully, but these errors were encountered:
Maybe this feature request could be combined with pull request #199 somehow? Seems like allowing msg to be a function wouldn't be a terrible idea... although in this case the function should be called with something like (value, validator, computed) and the other case would accept a string...
Presumably the framework could be tweaked where if msg was a string, it could turn into _.constant(theString) on the backend and silently discard those arguments, but an actual specified function would have enough information to generate those sorts of messages?
@blikblum@chiefGui Thoughts? If you're interested I could open a pull request to start the discussion, though I could use suggestions on what values should be passed to the message function.
I might open a separate issue just on how "default messages" (even if overridden) are handled differently from what I might call "inline messages" (per-validator). Inline messages can be functions returning strings, but are called with no parameters (via _.result) and this is set to the validator object. Default messages must be strings and have the private format function called by the default validators (supporting {0} style formatting). It would be awesome to get those unified.
Would we great to have support for (mustache) expansions/variables in validation messages to do something like
"just <x> characters to go for the title
The text was updated successfully, but these errors were encountered: