Results in error when the input name attribute has a dot even though it's a valid character (spec).
I suspect internally Vee-Validate is using dot notation to refer to an object with the same name as the input name attribute. If this is the case then using bracket notation would be a better choice for this.
I'd love to just change the input's name but I'm working on an existing Java app where that's simply not practical or possible without a major rewriting of the app code. Unforchunately this issue has become a release blocker in my project :rotating_light:
I'm going to have a quick go at fixing this but I'd definately appresiate any help if someone knows more about this issue!
Try to validate something like:
<input type="text" name="example.name">
which results in this console warning:
[vee-validate]: Validating a non-existant field: "example.name". Use "attach()" first.
Just want to confirm this error. Same behavior with data-vv-name directive. If it will not be fixed, at least it needed to be mentioned in documentation. I stumbled at this error and it took some time to me to realize the cause, especially when the HTML specifications says that dot is valid symbol.
I'm very sorry about this, I messed up with a little feature I was working on, basically example.name was being translated to something like scope: example, name: name internally, which of course causes your issue since you did not mean to scope the input.
I fixed the issue and built the files in my latest commit, you can pull it and use it in your project if its critical instead of waiting for a new release.
It should now look if there is indeed a field with a dot in it in the global scope, if it does it will validate that. otherwise it will treat it like a scoped name instead.
again sorry about this.
@logaretm great, thank you very much. No problem, I'll just use master for a while until the next release.
I also created PR https://github.com/logaretm/vee-validate/pull/305 which would have also been an acceptable solution.
P.s. thanks for Vee-validate, it's fun to use!