Skip to content
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

Something wrong with dots in 'data-vv-name' #462

Closed
pavel-mironchik opened this issue May 3, 2017 · 2 comments
Closed

Something wrong with dots in 'data-vv-name' #462

pavel-mironchik opened this issue May 3, 2017 · 2 comments
Labels
🐛 bug Unintended behavior

Comments

@pavel-mironchik
Copy link

Versions:

  • VueJs: 2.3.2
  • Vee-Validate: 2.0.0-rc.3

Description:

I recall that you fixed an issue with dots in field names, but it seems that in last release we have new one.

Steps To Reproduce:

I prepared jsfiddle: https://jsfiddle.net/brunen9/Lh8z20qf/1/
Open console and run fiddle, you'll see warnings. In Firefox it is:

TypeError: this.$scopes[scope][fieldName] is undefined

And in Chrome it says:

TypeError: Cannot read property 'events' of undefined

If you change the dot in 'data-vv-name' to underscore - the warnings will disappear.

P.S. I really need the dots in field names cause laravel validator for arrays returns field names delimited by dots.

@logaretm
Copy link
Owner

logaretm commented May 3, 2017

probably because the dots denote 'scoping' for the plugin, so it mistaken your dot as a scope.

So we have two options, either we check if there is a field with dots in its name and if found we will use that. or we check the scopes first if it has such a field.

I'm not sure which behavior takes precedence. probably the first like the previous issue.

@logaretm logaretm added the 🐛 bug Unintended behavior label May 3, 2017
@maxmilton
Copy link
Contributor

I'm running into this now too (again). I had to roll back to 2.0.0-beta.25 for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants