Open bjoernklose opened 5 years ago
My first official user! 😝 (apart from me)
Yes, still some work to do around replacing the field message, I might ask for more information from you if that's OK. Are you saying that you basically want to use the label
field as the i18n value?
Regarding the validateMessage
assignment, errorField
and errorForm
are designed to read slightly differently:
errorField
- replace {field}
placeholder with the more generic "This field..." for use inside the itemerrorForm
- replace `{field} with the name (or in your case, label) of the field for use outside the itemI would like to add more customisation around this, maybe by way of a default function or other options.
Do you have any thoughts on this mechanism in general? I don't have any real foreign language experience - would this work for languages other than English? I should probably look again at the Vee Validate i18n files:
Localisation was the next planned demo anyway, so perfect timing. In fact, do you have a demo i18n setup you could upload as a repo, or even sample code to post?
Also, thanks for the tip on Release It - that looks really useful.
So I like the way you've used label
to replace the field value, I think that works really well! Except... where there is no label, for example the Date and Time fields in the complex demo.
Ideally we need a way to derive this.
Thoughts:
data-label=""
attribute on the FormItem
this.$children[0].placeholder
as a last-ditch attempt to get a valueFYI, I've raised an issue for the the/this field thing here:
Hello There .. it would be nice if this could be merged :)
Sorry - I moved projects ages ago so this has all slipped in my priorities!
I need to look at everything again as I know Vee Validate has moved on since I looked at this last.
Hey there, thanks for your great plugin, happily using it on a project currently. Only when also integrating i18n, there was a small issue that needed fixing.
vee-validate
the{field}
text was displayed without being replaced.validateMessage
assignment"companyName" is a required field
, we will get to see"Your Company's Name" is a required field
Feel free to only use this as inspiration, as there are no proper tests etc. attached to this. Also, this is based on me playing around with the compiles
.esm.js
Version that is used in our project.One final though / wish while we're at it: Do you plan on doing versioned releases soon? If so, something like
release-it
might help make things easier for you.Thanks