{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/79042545","id":79042545,"diff_hunk":"@@ -458,6 +392,7 @@ function checkUserValidity(element, propagate = false) {\n     // guaranteed to make the fieldset and form invalid as well.\n     shouldPropagate = true;\n   }\n+  updateInvalidTypesClasses(element);","path":"extensions/amp-form/0.1/amp-form.js","position":188,"original_position":188,"commit_id":"661c39ea6c9471b8ed0b08bab7f87f26f0ac4b48","original_commit_id":"661c39ea6c9471b8ed0b08bab7f87f26f0ac4b48","user":{"login":"mkhatib","id":2647,"avatar_url":"https://avatars.githubusercontent.com/u/2647?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhatib","html_url":"https://github.com/mkhatib","followers_url":"https://api.github.com/users/mkhatib/followers","following_url":"https://api.github.com/users/mkhatib/following{/other_user}","gists_url":"https://api.github.com/users/mkhatib/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhatib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhatib/subscriptions","organizations_url":"https://api.github.com/users/mkhatib/orgs","repos_url":"https://api.github.com/users/mkhatib/repos","events_url":"https://api.github.com/users/mkhatib/events{/privacy}","received_events_url":"https://api.github.com/users/mkhatib/received_events","type":"User","site_admin":false},"body":"I'll refactor this a bit to fix this up","created_at":"2016-09-15T19:26:01Z","updated_at":"2016-09-15T19:26:01Z","html_url":"https://github.com/ampproject/amphtml/pull/5006#discussion_r79042545","pull_request_url":"https://api.github.com/repos/ampproject/amphtml/pulls/5006","_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments/79042545"},"html":{"href":"https://github.com/ampproject/amphtml/pull/5006#discussion_r79042545"},"pull_request":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/5006"}}},"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/5006","id":85319967,"html_url":"https://github.com/ampproject/amphtml/pull/5006","diff_url":"https://github.com/ampproject/amphtml/pull/5006.diff","patch_url":"https://github.com/ampproject/amphtml/pull/5006.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/5006","number":5006,"state":"open","locked":false,"title":"WIP: Refactor validation logic and introduce Custom Validators for forms","user":{"login":"mkhatib","id":2647,"avatar_url":"https://avatars.githubusercontent.com/u/2647?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhatib","html_url":"https://github.com/mkhatib","followers_url":"https://api.github.com/users/mkhatib/followers","following_url":"https://api.github.com/users/mkhatib/following{/other_user}","gists_url":"https://api.github.com/users/mkhatib/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhatib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhatib/subscriptions","organizations_url":"https://api.github.com/users/mkhatib/orgs","repos_url":"https://api.github.com/users/mkhatib/repos","events_url":"https://api.github.com/users/mkhatib/events{/privacy}","received_events_url":"https://api.github.com/users/mkhatib/received_events","type":"User","site_admin":false},"body":"This refactors the validation logic and introduce 3 type of custom validators. Looking for some early feedback on the implementation approach if this looks good I can get started on tests.\r\n\r\nThis also closes #4305\r\n\r\nDemos at [the bottom of the page here](https://amp-mk-1.herokuapp.com/examples/forms.amp.max.html). (Make sure to toggle both `amp-form` and `form-submit` experiments on)\r\n\r\nITI: #3343 ","created_at":"2016-09-14T22:53:38Z","updated_at":"2016-09-15T19:26:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a66ca114e2d92366d4891f5130195d6ad4d0a089","assignee":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"assignees":[{"login":"jridgewell","id":112982,"avatar_url":"https://avatars.githubusercontent.com/u/112982?v=3","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/5006/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/5006/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/5006/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/661c39ea6c9471b8ed0b08bab7f87f26f0ac4b48","head":{"label":"mkhatib:custom-validation","ref":"custom-validation","sha":"661c39ea6c9471b8ed0b08bab7f87f26f0ac4b48","user":{"login":"mkhatib","id":2647,"avatar_url":"https://avatars.githubusercontent.com/u/2647?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhatib","html_url":"https://github.com/mkhatib","followers_url":"https://api.github.com/users/mkhatib/followers","following_url":"https://api.github.com/users/mkhatib/following{/other_user}","gists_url":"https://api.github.com/users/mkhatib/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhatib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhatib/subscriptions","organizations_url":"https://api.github.com/users/mkhatib/orgs","repos_url":"https://api.github.com/users/mkhatib/repos","events_url":"https://api.github.com/users/mkhatib/events{/privacy}","received_events_url":"https://api.github.com/users/mkhatib/received_events","type":"User","site_admin":false},"repo":{"id":49671997,"name":"amphtml","full_name":"mkhatib/amphtml","owner":{"login":"mkhatib","id":2647,"avatar_url":"https://avatars.githubusercontent.com/u/2647?v=3","gravatar_id":"","url":"https://api.github.com/users/mkhatib","html_url":"https://github.com/mkhatib","followers_url":"https://api.github.com/users/mkhatib/followers","following_url":"https://api.github.com/users/mkhatib/following{/other_user}","gists_url":"https://api.github.com/users/mkhatib/gists{/gist_id}","starred_url":"https://api.github.com/users/mkhatib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkhatib/subscriptions","organizations_url":"https://api.github.com/users/mkhatib/orgs","repos_url":"https://api.github.com/users/mkhatib/repos","events_url":"https://api.github.com/users/mkhatib/events{/privacy}","received_events_url":"https://api.github.com/users/mkhatib/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkhatib/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/mkhatib/amphtml","forks_url":"https://api.github.com/repos/mkhatib/amphtml/forks","keys_url":"https://api.github.com/repos/mkhatib/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkhatib/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkhatib/amphtml/teams","hooks_url":"https://api.github.com/repos/mkhatib/amphtml/hooks","issue_events_url":"https://api.github.com/repos/mkhatib/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/mkhatib/amphtml/events","assignees_url":"https://api.github.com/repos/mkhatib/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/mkhatib/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/mkhatib/amphtml/tags","blobs_url":"https://api.github.com/repos/mkhatib/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkhatib/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkhatib/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkhatib/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkhatib/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/mkhatib/amphtml/languages","stargazers_url":"https://api.github.com/repos/mkhatib/amphtml/stargazers","contributors_url":"https://api.github.com/repos/mkhatib/amphtml/contributors","subscribers_url":"https://api.github.com/repos/mkhatib/amphtml/subscribers","subscription_url":"https://api.github.com/repos/mkhatib/amphtml/subscription","commits_url":"https://api.github.com/repos/mkhatib/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkhatib/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkhatib/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkhatib/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/mkhatib/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/mkhatib/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkhatib/amphtml/merges","archive_url":"https://api.github.com/repos/mkhatib/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkhatib/amphtml/downloads","issues_url":"https://api.github.com/repos/mkhatib/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/mkhatib/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/mkhatib/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/mkhatib/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkhatib/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/mkhatib/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/mkhatib/amphtml/deployments","created_at":"2016-01-14T20:05:58Z","updated_at":"2016-01-14T20:06:00Z","pushed_at":"2016-09-15T07:37:08Z","git_url":"git://github.com/mkhatib/amphtml.git","ssh_url":"git@github.com:mkhatib/amphtml.git","clone_url":"https://github.com/mkhatib/amphtml.git","svn_url":"https://github.com/mkhatib/amphtml","homepage":"https://ampproject.org","size":156008,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"ampproject:master","ref":"master","sha":"a19ec52b24420bc2300e99bd193aa77234f57845","user":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"avatar_url":"https://avatars.githubusercontent.com/u/14114390?v=3","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2016-09-15T17:39:18Z","pushed_at":"2016-09-15T19:19:33Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://ampproject.org","size":201269,"stargazers_count":8469,"watchers_count":8469,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1252,"mirror_url":null,"open_issues_count":748,"forks":1252,"open_issues":748,"watchers":8469,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/5006"},"html":{"href":"https://github.com/ampproject/amphtml/pull/5006"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/5006"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/5006/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/5006/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/5006/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/661c39ea6c9471b8ed0b08bab7f87f26f0ac4b48"}}}}
{"actor":{"display_login":"mkhatib"}}