{"action":"created","issue":{"url":"https://api.github.com/repos/baianat/vee-validate/issues/1547","repository_url":"https://api.github.com/repos/baianat/vee-validate","labels_url":"https://api.github.com/repos/baianat/vee-validate/issues/1547/labels{/name}","comments_url":"https://api.github.com/repos/baianat/vee-validate/issues/1547/comments","events_url":"https://api.github.com/repos/baianat/vee-validate/issues/1547/events","html_url":"https://github.com/baianat/vee-validate/issues/1547","id":352120370,"node_id":"MDU6SXNzdWUzNTIxMjAzNzA=","number":1547,"title":"errorbag not working when using slots","user":{"login":"ThomasKuhlmann","id":35376024,"node_id":"MDQ6VXNlcjM1Mzc2MDI0","avatar_url":"https://avatars0.githubusercontent.com/u/35376024?v=4","gravatar_id":"","url":"https://api.github.com/users/ThomasKuhlmann","html_url":"https://github.com/ThomasKuhlmann","followers_url":"https://api.github.com/users/ThomasKuhlmann/followers","following_url":"https://api.github.com/users/ThomasKuhlmann/following{/other_user}","gists_url":"https://api.github.com/users/ThomasKuhlmann/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasKuhlmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasKuhlmann/subscriptions","organizations_url":"https://api.github.com/users/ThomasKuhlmann/orgs","repos_url":"https://api.github.com/users/ThomasKuhlmann/repos","events_url":"https://api.github.com/users/ThomasKuhlmann/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasKuhlmann/received_events","type":"User","site_admin":false},"labels":[{"id":416502841,"node_id":"MDU6TGFiZWw0MTY1MDI4NDE=","url":"https://api.github.com/repos/baianat/vee-validate/labels/bug","name":"bug","color":"d73a4a","default":true},{"id":973804026,"node_id":"MDU6TGFiZWw5NzM4MDQwMjY=","url":"https://api.github.com/repos/baianat/vee-validate/labels/has%20workaround","name":"has workaround","color":"720eb5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-20T12:50:21Z","updated_at":"2018-08-31T16:36:25Z","closed_at":null,"author_association":"NONE","body":"#### Versions:\r\n- VueJs: 2.5.17\r\n- Vee-Validate: 2.1.0-beta.8\r\n\r\n### Description:\r\n\r\n`this.$validator.errors.any() `or `this.errors.any()` (or all() ) are not showing any errors when custom input components are used in combination with a wrapper and slots. However, the input itself shows the error and in the vue devtools you can see that the errorbag in the parent contains errors (both directly and via the injected validator). \r\nThis is probably not a bug, just a lack of understanding on my side of how the validator and inheritance works - obviously the data is traversing up the tree and I should be able to access them it in the parent, but using a wrapper with slots seems to be causing issues. \r\nIs there a trick to get vee-validate working with slots? I couldn't find any working example for it.\r\n\r\n### Steps To Reproduce:\r\nI have created a fiddle - you can simply test the different behaviour by removing the dialog wrapper in demo.vue\r\nhttps://codesandbox.io/s/23n91r2vry"},"comment":{"url":"https://api.github.com/repos/baianat/vee-validate/issues/comments/417720645","html_url":"https://github.com/baianat/vee-validate/issues/1547#issuecomment-417720645","issue_url":"https://api.github.com/repos/baianat/vee-validate/issues/1547","id":417720645,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzcyMDY0NQ==","user":{"login":"logaretm","id":6261322,"node_id":"MDQ6VXNlcjYyNjEzMjI=","avatar_url":"https://avatars3.githubusercontent.com/u/6261322?v=4","gravatar_id":"","url":"https://api.github.com/users/logaretm","html_url":"https://github.com/logaretm","followers_url":"https://api.github.com/users/logaretm/followers","following_url":"https://api.github.com/users/logaretm/following{/other_user}","gists_url":"https://api.github.com/users/logaretm/gists{/gist_id}","starred_url":"https://api.github.com/users/logaretm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logaretm/subscriptions","organizations_url":"https://api.github.com/users/logaretm/orgs","repos_url":"https://api.github.com/users/logaretm/repos","events_url":"https://api.github.com/users/logaretm/events{/privacy}","received_events_url":"https://api.github.com/users/logaretm/received_events","type":"User","site_admin":false},"created_at":"2018-08-31T16:36:25Z","updated_at":"2018-08-31T16:36:25Z","author_association":"COLLABORATOR","body":"Sorry for taking a long time to address this issue, I suspect there is an issue in the automatic injection not prioritzing the `inject` API. I will investigate it and report back.\r\n\r\nat the moment you can workaround the issue by disabling automatic injection all together and manage your nodes validators manually like this example:\r\n\r\nhttps://codesandbox.io/s/j3vnlkm05w\r\n\r\nThe demo component is the parent of your input components, meaning we can safely assume its the __validation provider__ and thus we inject a new validator instance in it to be the main validator to be inherited by your input components.\r\n\r\nTo add a new validator instance to a component you need to add `$_veeValidate.validator` to the component options:\r\n```js\r\n{\r\n  $_veeValidate: {\r\n    validator: 'new' // get me a new validator\r\n  },\r\n}\r\n```\r\n\r\nYou can read more about this topic here:\r\n\r\nhttps://baianat.github.io/vee-validate/concepts/injections.html\r\n"}}
{"actor":{"display_login":"logaretm"}}