{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/68176288","id":68176288,"diff_hunk":"@@ -100,6 +100,13 @@ export abstract class AbstractControl {\n \n   get pending(): boolean { return this._status == PENDING; }\n \n+  setValidators(newValidator: ValidatorFn|ValidatorFn[]) {","path":"modules/@angular/forms/src/model.ts","position":4,"original_position":4,"commit_id":"9705d0dd24f2f8dd2a28225d4cb05118e89a4cfe","original_commit_id":"9705d0dd24f2f8dd2a28225d4cb05118e89a4cfe","user":{"login":"kara","id":3871688,"avatar_url":"https://avatars.githubusercontent.com/u/3871688?v=3","gravatar_id":"","url":"https://api.github.com/users/kara","html_url":"https://github.com/kara","followers_url":"https://api.github.com/users/kara/followers","following_url":"https://api.github.com/users/kara/following{/other_user}","gists_url":"https://api.github.com/users/kara/gists{/gist_id}","starred_url":"https://api.github.com/users/kara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kara/subscriptions","organizations_url":"https://api.github.com/users/kara/orgs","repos_url":"https://api.github.com/users/kara/repos","events_url":"https://api.github.com/users/kara/events{/privacy}","received_events_url":"https://api.github.com/users/kara/received_events","type":"User","site_admin":false},"body":"Can you add a return type?  Here and on line 108","created_at":"2016-06-23T05:07:23Z","updated_at":"2016-06-23T05:07:23Z","html_url":"https://github.com/angular/angular/pull/9516#discussion_r68176288","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/9516","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/68176288"},"html":{"href":"https://github.com/angular/angular/pull/9516#discussion_r68176288"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/9516"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/9516","id":74889805,"html_url":"https://github.com/angular/angular/pull/9516","diff_url":"https://github.com/angular/angular/pull/9516.diff","patch_url":"https://github.com/angular/angular/pull/9516.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/9516","number":9516,"state":"open","locked":false,"title":"feat(forms): easier updating of validators on existing controls","user":{"login":"thelgevold","id":349548,"avatar_url":"https://avatars.githubusercontent.com/u/349548?v=3","gravatar_id":"","url":"https://api.github.com/users/thelgevold","html_url":"https://github.com/thelgevold","followers_url":"https://api.github.com/users/thelgevold/followers","following_url":"https://api.github.com/users/thelgevold/following{/other_user}","gists_url":"https://api.github.com/users/thelgevold/gists{/gist_id}","starred_url":"https://api.github.com/users/thelgevold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelgevold/subscriptions","organizations_url":"https://api.github.com/users/thelgevold/orgs","repos_url":"https://api.github.com/users/thelgevold/repos","events_url":"https://api.github.com/users/thelgevold/events{/privacy}","received_events_url":"https://api.github.com/users/thelgevold/received_events","type":"User","site_admin":false},"body":"**Please check if the PR fulfills these requirements**\r\n- [x] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-format\r\n- [x] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n\r\n\r\n**What kind of change does this PR introduce?** (check one with \"x\")\r\n```\r\n[ ] Bugfix\r\n[x] Feature\r\n[ ] Code style update (formatting, local variables)\r\n[ ] Refactoring (no functional changes, no api changes)\r\n[ ] Build related changes\r\n[ ] CI related changes\r\n[ ] Other... Please describe:\r\n```\r\n\r\nThis will add support for setting and clearing validators on exiting controls. It's already possible to do this by manipulating the ```.validator``` property on the control, but I am proposing this as an enhancement of the existing API.\r\n\r\nThe use case is dynamic forms where user actions in the form might require validation rules on any given control to change dynamically. The goal is to make the validator updates easier. \r\n\r\n\r\n**Does this PR introduce a breaking change?** (check one with \"x\")\r\n```\r\n[ ] Yes\r\n[x] No\r\n```\r\n\r\nIf this PR contains a breaking change, please describe the impact and migration path for existing applications: ...\r\n\r\n\r\n**Other information**:\r\n\r\n\r\n","created_at":"2016-06-23T03:06:11Z","updated_at":"2016-06-23T05:07:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4df1200c585aa55a42c5a6fe4836bac1057efff3","assignee":{"login":"kara","id":3871688,"avatar_url":"https://avatars.githubusercontent.com/u/3871688?v=3","gravatar_id":"","url":"https://api.github.com/users/kara","html_url":"https://github.com/kara","followers_url":"https://api.github.com/users/kara/followers","following_url":"https://api.github.com/users/kara/following{/other_user}","gists_url":"https://api.github.com/users/kara/gists{/gist_id}","starred_url":"https://api.github.com/users/kara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kara/subscriptions","organizations_url":"https://api.github.com/users/kara/orgs","repos_url":"https://api.github.com/users/kara/repos","events_url":"https://api.github.com/users/kara/events{/privacy}","received_events_url":"https://api.github.com/users/kara/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/9516/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/9516/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/9516/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/9705d0dd24f2f8dd2a28225d4cb05118e89a4cfe","head":{"label":"thelgevold:support-setting-validators-on-controls","ref":"support-setting-validators-on-controls","sha":"9705d0dd24f2f8dd2a28225d4cb05118e89a4cfe","user":{"login":"thelgevold","id":349548,"avatar_url":"https://avatars.githubusercontent.com/u/349548?v=3","gravatar_id":"","url":"https://api.github.com/users/thelgevold","html_url":"https://github.com/thelgevold","followers_url":"https://api.github.com/users/thelgevold/followers","following_url":"https://api.github.com/users/thelgevold/following{/other_user}","gists_url":"https://api.github.com/users/thelgevold/gists{/gist_id}","starred_url":"https://api.github.com/users/thelgevold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelgevold/subscriptions","organizations_url":"https://api.github.com/users/thelgevold/orgs","repos_url":"https://api.github.com/users/thelgevold/repos","events_url":"https://api.github.com/users/thelgevold/events{/privacy}","received_events_url":"https://api.github.com/users/thelgevold/received_events","type":"User","site_admin":false},"repo":{"id":61755463,"name":"angular","full_name":"thelgevold/angular","owner":{"login":"thelgevold","id":349548,"avatar_url":"https://avatars.githubusercontent.com/u/349548?v=3","gravatar_id":"","url":"https://api.github.com/users/thelgevold","html_url":"https://github.com/thelgevold","followers_url":"https://api.github.com/users/thelgevold/followers","following_url":"https://api.github.com/users/thelgevold/following{/other_user}","gists_url":"https://api.github.com/users/thelgevold/gists{/gist_id}","starred_url":"https://api.github.com/users/thelgevold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelgevold/subscriptions","organizations_url":"https://api.github.com/users/thelgevold/orgs","repos_url":"https://api.github.com/users/thelgevold/repos","events_url":"https://api.github.com/users/thelgevold/events{/privacy}","received_events_url":"https://api.github.com/users/thelgevold/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thelgevold/angular","description":"","fork":true,"url":"https://api.github.com/repos/thelgevold/angular","forks_url":"https://api.github.com/repos/thelgevold/angular/forks","keys_url":"https://api.github.com/repos/thelgevold/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thelgevold/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thelgevold/angular/teams","hooks_url":"https://api.github.com/repos/thelgevold/angular/hooks","issue_events_url":"https://api.github.com/repos/thelgevold/angular/issues/events{/number}","events_url":"https://api.github.com/repos/thelgevold/angular/events","assignees_url":"https://api.github.com/repos/thelgevold/angular/assignees{/user}","branches_url":"https://api.github.com/repos/thelgevold/angular/branches{/branch}","tags_url":"https://api.github.com/repos/thelgevold/angular/tags","blobs_url":"https://api.github.com/repos/thelgevold/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thelgevold/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thelgevold/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/thelgevold/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thelgevold/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/thelgevold/angular/languages","stargazers_url":"https://api.github.com/repos/thelgevold/angular/stargazers","contributors_url":"https://api.github.com/repos/thelgevold/angular/contributors","subscribers_url":"https://api.github.com/repos/thelgevold/angular/subscribers","subscription_url":"https://api.github.com/repos/thelgevold/angular/subscription","commits_url":"https://api.github.com/repos/thelgevold/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/thelgevold/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/thelgevold/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/thelgevold/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/thelgevold/angular/contents/{+path}","compare_url":"https://api.github.com/repos/thelgevold/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thelgevold/angular/merges","archive_url":"https://api.github.com/repos/thelgevold/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thelgevold/angular/downloads","issues_url":"https://api.github.com/repos/thelgevold/angular/issues{/number}","pulls_url":"https://api.github.com/repos/thelgevold/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/thelgevold/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/thelgevold/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thelgevold/angular/labels{/name}","releases_url":"https://api.github.com/repos/thelgevold/angular/releases{/id}","deployments_url":"https://api.github.com/repos/thelgevold/angular/deployments","created_at":"2016-06-22T22:24:32Z","updated_at":"2016-06-22T22:24:53Z","pushed_at":"2016-06-23T03:18:50Z","git_url":"git://github.com/thelgevold/angular.git","ssh_url":"git@github.com:thelgevold/angular.git","clone_url":"https://github.com/thelgevold/angular.git","svn_url":"https://github.com/thelgevold/angular","homepage":"https://angular.io","size":410654,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"a5f2e205ef5fd1f9137515bdcaf80c2d53561add","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":24195339,"name":"angular","full_name":"angular/angular","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular","description":"","fork":false,"url":"https://api.github.com/repos/angular/angular","forks_url":"https://api.github.com/repos/angular/angular/forks","keys_url":"https://api.github.com/repos/angular/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular/teams","hooks_url":"https://api.github.com/repos/angular/angular/hooks","issue_events_url":"https://api.github.com/repos/angular/angular/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular/events","assignees_url":"https://api.github.com/repos/angular/angular/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular/tags","blobs_url":"https://api.github.com/repos/angular/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular/languages","stargazers_url":"https://api.github.com/repos/angular/angular/stargazers","contributors_url":"https://api.github.com/repos/angular/angular/contributors","subscribers_url":"https://api.github.com/repos/angular/angular/subscribers","subscription_url":"https://api.github.com/repos/angular/angular/subscription","commits_url":"https://api.github.com/repos/angular/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular/merges","archive_url":"https://api.github.com/repos/angular/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular/downloads","issues_url":"https://api.github.com/repos/angular/angular/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular/deployments","created_at":"2014-09-18T16:12:01Z","updated_at":"2016-06-23T04:01:50Z","pushed_at":"2016-06-23T03:18:51Z","git_url":"git://github.com/angular/angular.git","ssh_url":"git@github.com:angular/angular.git","clone_url":"https://github.com/angular/angular.git","svn_url":"https://github.com/angular/angular","homepage":"https://angular.io","size":648233,"stargazers_count":13128,"watchers_count":13128,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3397,"mirror_url":null,"open_issues_count":1434,"forks":3397,"open_issues":1434,"watchers":13128,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/9516"},"html":{"href":"https://github.com/angular/angular/pull/9516"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/9516"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/9516/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/9516/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/9516/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/9705d0dd24f2f8dd2a28225d4cb05118e89a4cfe"}}}}
{"actor":{"display_login":"kara"}}