{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular/issues/8834","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/8834/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/8834/comments","events_url":"https://api.github.com/repos/angular/angular/issues/8834/events","html_url":"https://github.com/angular/angular/issues/8834","id":156773434,"number":8834,"title":"ValidatorFn not included in the src/common/forms barrel","user":{"login":"matheo","id":260185,"avatar_url":"https://avatars.githubusercontent.com/u/260185?v=3","gravatar_id":"","url":"https://api.github.com/users/matheo","html_url":"https://github.com/matheo","followers_url":"https://api.github.com/users/matheo/followers","following_url":"https://api.github.com/users/matheo/following{/other_user}","gists_url":"https://api.github.com/users/matheo/gists{/gist_id}","starred_url":"https://api.github.com/users/matheo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matheo/subscriptions","organizations_url":"https://api.github.com/users/matheo/orgs","repos_url":"https://api.github.com/users/matheo/repos","events_url":"https://api.github.com/users/matheo/events{/privacy}","received_events_url":"https://api.github.com/users/matheo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-25T15:00:27Z","updated_at":"2016-05-25T15:00:27Z","closed_at":null,"body":"* **I'm submitting a ...**\r\n- [ x ] bug report\r\n- [ ] feature request\r\n\r\n**Current declaration**\r\n\r\nBuilding my own Form Validators, I found that there's no easy way to get the ValidatorFn interface, as it's not included in the barrel, so we need to import it like:\r\n```\r\nimport {ValidatorFn} from 'angular2/src/common/forms/directives/validators';\r\n```\r\n\r\n**Expected/desired declaration**\r\n\r\nIt would be cool to have something like:\r\n```\r\nimport {ValidatorFn} from 'angular2/common';\r\n```\r\nso we can easily define our own valitador functions with parameters enabled:\r\n```\r\nexport class MyValidator\r\n{\r\n  static myValidatorFunction(param: any): ValidatorFn {\r\n    return (control: AbstractControl): {[key: string]: any} => {\r\n      ...\r\n    };\r\n  }\r\n}\r\n```\r\nplease include it in the barrel :)\r\n\r\n** Statement ** \r\n\r\nI know this isn't a bug, but it would be nice if this have a little attention as it's easy to resolve. I would submit a pull request but I'm not familiar enough with any JS builds there.\r\nThanks in advance"}}
{"actor":{"display_login":"matheo"}}