{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/validation/issues/338","repository_url":"https://api.github.com/repos/aurelia/validation","labels_url":"https://api.github.com/repos/aurelia/validation/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/validation/issues/338/comments","events_url":"https://api.github.com/repos/aurelia/validation/issues/338/events","html_url":"https://github.com/aurelia/validation/pull/338","id":178399628,"number":338,"title":"feat(ValidationControllerFactory): add Validator parameter to createForCurrentScope","user":{"login":"dkent600","id":1821666,"avatar_url":"https://avatars.githubusercontent.com/u/1821666?v=3","gravatar_id":"","url":"https://api.github.com/users/dkent600","html_url":"https://github.com/dkent600","followers_url":"https://api.github.com/users/dkent600/followers","following_url":"https://api.github.com/users/dkent600/following{/other_user}","gists_url":"https://api.github.com/users/dkent600/gists{/gist_id}","starred_url":"https://api.github.com/users/dkent600/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkent600/subscriptions","organizations_url":"https://api.github.com/users/dkent600/orgs","repos_url":"https://api.github.com/users/dkent600/repos","events_url":"https://api.github.com/users/dkent600/events{/privacy}","received_events_url":"https://api.github.com/users/dkent600/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aurelia/validation/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/aurelia/validation/milestones/3","html_url":"https://github.com/aurelia/validation/milestones/beta","labels_url":"https://api.github.com/repos/aurelia/validation/milestones/3/labels","id":1972169,"number":3,"title":"beta","description":"","creator":{"login":"jdanyow","id":1306747,"avatar_url":"https://avatars.githubusercontent.com/u/1306747?v=3","gravatar_id":"","url":"https://api.github.com/users/jdanyow","html_url":"https://github.com/jdanyow","followers_url":"https://api.github.com/users/jdanyow/followers","following_url":"https://api.github.com/users/jdanyow/following{/other_user}","gists_url":"https://api.github.com/users/jdanyow/gists{/gist_id}","starred_url":"https://api.github.com/users/jdanyow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdanyow/subscriptions","organizations_url":"https://api.github.com/users/jdanyow/orgs","repos_url":"https://api.github.com/users/jdanyow/repos","events_url":"https://api.github.com/users/jdanyow/events{/privacy}","received_events_url":"https://api.github.com/users/jdanyow/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":15,"state":"open","created_at":"2016-08-30T11:29:09Z","updated_at":"2016-09-25T03:04:50Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2016-09-21T16:34:31Z","updated_at":"2016-09-25T08:45:24Z","closed_at":"2016-09-25T03:04:50Z","pull_request":{"url":"https://api.github.com/repos/aurelia/validation/pulls/338","html_url":"https://github.com/aurelia/validation/pull/338","diff_url":"https://github.com/aurelia/validation/pull/338.diff","patch_url":"https://github.com/aurelia/validation/pull/338.patch"},"body":"feat(ValidationControllerFactory): add Validator parameter to createForCurrentScope\r\n\r\nIt is not currently possible to provide a Validater to a specific\r\ninstance of ValidationController, at least, not without using injection.\r\n\r\nValidationControllerFactory.createForCurrentScope has been provided to enable\r\nus to instantiate ValidationController without the use of injection, but\r\nprovides no means of supplying a Validator for the controller instance.\r\n\r\nI have a use case where the ValidationController needs to be\r\ninstantiated without the use of injection because the code is in a base\r\nclass where, due to javascript/typescript limitations, injection cannot\r\nbe used.\r\n\r\nNote: I'm not altering the documentation because it ties into:\r\n\r\n1) documentation about configuring the plugin, which I believe is\r\nmissing altogether\r\n2) other means of assigning a Validator to a controller (through\r\ninjection) that I understand are being added but may yet have been\r\ndocumented.\r\n\r\nThus I think someone with more broad knowledge of all of this should\r\nundertake the task of documenting the whole thing together."},"comment":{"url":"https://api.github.com/repos/aurelia/validation/issues/comments/249410274","html_url":"https://github.com/aurelia/validation/pull/338#issuecomment-249410274","issue_url":"https://api.github.com/repos/aurelia/validation/issues/338","id":249410274,"user":{"login":"doktordirk","id":13430091,"avatar_url":"https://avatars.githubusercontent.com/u/13430091?v=3","gravatar_id":"","url":"https://api.github.com/users/doktordirk","html_url":"https://github.com/doktordirk","followers_url":"https://api.github.com/users/doktordirk/followers","following_url":"https://api.github.com/users/doktordirk/following{/other_user}","gists_url":"https://api.github.com/users/doktordirk/gists{/gist_id}","starred_url":"https://api.github.com/users/doktordirk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doktordirk/subscriptions","organizations_url":"https://api.github.com/users/doktordirk/orgs","repos_url":"https://api.github.com/users/doktordirk/repos","events_url":"https://api.github.com/users/doktordirk/events{/privacy}","received_events_url":"https://api.github.com/users/doktordirk/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T08:45:24Z","updated_at":"2016-09-25T08:45:24Z","body":"@dkent609 ps: don.t worry too much. such things happen. just make another PR with the reverted constroller.\r\n\r\nps: if there isn't it.does add a test \r\n```js\r\n  it('createForCurrentScopeWithStandardValidator', () => {\r\n     const container = new Container();\r\n     const childContainer = container.createChild();\r\n\r\n     const factory = childContainer.get(ValidationControllerFactory);\r\n  const validator = childContainer.get(Validator);\r\n \r\n     const controller = factory.createForCurrentScope();\r\n\r\n     expect(controller.validator).toBe(validator);\r\n   });\r\n```"}}
{"actor":{"display_login":"doktordirk"}}