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

Validating a specific scope does not work as of 2.0.0-beta.15 #148

Closed
logaretm opened this issue Nov 28, 2016 · 2 comments
Closed

Validating a specific scope does not work as of 2.0.0-beta.15 #148

logaretm opened this issue Nov 28, 2016 · 2 comments

Comments

@logaretm
Copy link
Owner

Versions:

  • VueJs: 2.1.0
  • Vee-Validate: 2.0.0-beta.15

Description:

When trying to validate a specific scope using validateAll('scope') it will instead split the string and validate non-existent fields with numeric names:

[vee-validate]: Trying to validate a non-existant field: "0". Use "attach()" first.

Steps To Reproduce:

Create an input group with any scope, then try to run validator.validateAll('scope').

@nikolaynesov
Copy link

Also after updating to 2.0.0-beta.15 there is an error:
Uncaught (in promise) TypeError: Cannot read property 'split' of null
that refers to

checks.split('|').forEach(function (rule) {
                var normalizedRule = _this5._normalizeRule(rule, _this5.$fields[name].validations);
                if (!normalizedRule.name) {
                    return;
                }

                if (normalizedRule.name === 'required') {
                    _this5.$fields[name].required = true;
                }

                _this5.$fields[name].validations.push(normalizedRule);
            });

@logaretm
Copy link
Owner Author

logaretm commented Nov 28, 2016

make sure that the data-attributes are prefixed correctly with 'vv' for example data-vv-rules as they were prefixed as of 2.0.0-beta.15 to prevent conflicts with other plugins.

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

No branches or pull requests

2 participants