{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/37593041","id":37593041,"diff_hunk":"@@ -204,6 +204,21 @@ describe('validators', function() {\n       expect($rootScope.form.test.$error.pattern).toBe(true);\n       expect(inputElm).not.toBeValid();\n     });\n+\n+\n+    it('should validate the viewValue and not the modelValue', function() {\n+      var inputElm = helper.compileInput('<input type=\"text\" name=\"test\" ng-model=\"value\" pattern=\"\\\\d{4}$\">');","path":"test/ng/directive/validatorsSpec.js","position":7,"original_position":7,"commit_id":"459daca7aaaf8e70167de5aaabdc039db69898ab","original_commit_id":"459daca7aaaf8e70167de5aaabdc039db69898ab","user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"body":"I suspect this is a copy-paste from the previous test, but the trailing `$` doesn't seem to be necessary (neither here nor in other tests).","created_at":"2015-08-20T23:32:38Z","updated_at":"2015-08-20T23:32:38Z","html_url":"https://github.com/angular/angular.js/pull/12640#discussion_r37593041","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/12640","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/37593041"},"html":{"href":"https://github.com/angular/angular.js/pull/12640#discussion_r37593041"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12640"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/12640","id":42959625,"html_url":"https://github.com/angular/angular.js/pull/12640","diff_url":"https://github.com/angular/angular.js/pull/12640.diff","patch_url":"https://github.com/angular/angular.js/pull/12640.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/12640","number":12640,"state":"open","locked":false,"title":"fix(ngModel): validate pattern against the viewValue","user":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"body":"Since the HTML5 pattern validation constraint validates the input value,\r\nwe should also validate against the viewValue. This allows e.g. input[date]\r\nto validate both the input format of the date and the date object itself.\r\n\r\nFixes #12344 \r\n\r\n(Also needs to be backported to 1.3)","created_at":"2015-08-20T18:07:08Z","updated_at":"2015-08-20T23:32:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cacd41a3c473928a376b5c31c79579dfdfa160b","assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/100","html_url":"https://github.com/angular/angular.js/milestones/1.4.5","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/100/labels","id":1212201,"number":100,"title":"1.4.5","description":"","creator":{"login":"matsko","id":93018,"avatar_url":"https://avatars.githubusercontent.com/u/93018?v=3","gravatar_id":"","url":"https://api.github.com/users/matsko","html_url":"https://github.com/matsko","followers_url":"https://api.github.com/users/matsko/followers","following_url":"https://api.github.com/users/matsko/following{/other_user}","gists_url":"https://api.github.com/users/matsko/gists{/gist_id}","starred_url":"https://api.github.com/users/matsko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matsko/subscriptions","organizations_url":"https://api.github.com/users/matsko/orgs","repos_url":"https://api.github.com/users/matsko/repos","events_url":"https://api.github.com/users/matsko/events{/privacy}","received_events_url":"https://api.github.com/users/matsko/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":14,"state":"open","created_at":"2015-07-17T02:57:56Z","updated_at":"2015-08-20T18:11:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/12640/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/12640/comments","review_comment_url":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/12640/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/459daca7aaaf8e70167de5aaabdc039db69898ab","head":{"label":"Narretz:fix-pattern-no-bc","ref":"fix-pattern-no-bc","sha":"459daca7aaaf8e70167de5aaabdc039db69898ab","user":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"repo":{"id":14773045,"name":"angular.js","full_name":"Narretz/angular.js","owner":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Narretz/angular.js","description":"","fork":true,"url":"https://api.github.com/repos/Narretz/angular.js","forks_url":"https://api.github.com/repos/Narretz/angular.js/forks","keys_url":"https://api.github.com/repos/Narretz/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Narretz/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Narretz/angular.js/teams","hooks_url":"https://api.github.com/repos/Narretz/angular.js/hooks","issue_events_url":"https://api.github.com/repos/Narretz/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/Narretz/angular.js/events","assignees_url":"https://api.github.com/repos/Narretz/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/Narretz/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/Narretz/angular.js/tags","blobs_url":"https://api.github.com/repos/Narretz/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Narretz/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Narretz/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Narretz/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Narretz/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Narretz/angular.js/languages","stargazers_url":"https://api.github.com/repos/Narretz/angular.js/stargazers","contributors_url":"https://api.github.com/repos/Narretz/angular.js/contributors","subscribers_url":"https://api.github.com/repos/Narretz/angular.js/subscribers","subscription_url":"https://api.github.com/repos/Narretz/angular.js/subscription","commits_url":"https://api.github.com/repos/Narretz/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Narretz/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Narretz/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Narretz/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Narretz/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/Narretz/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Narretz/angular.js/merges","archive_url":"https://api.github.com/repos/Narretz/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Narretz/angular.js/downloads","issues_url":"https://api.github.com/repos/Narretz/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/Narretz/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Narretz/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Narretz/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Narretz/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/Narretz/angular.js/releases{/id}","created_at":"2013-11-28T09:39:41Z","updated_at":"2015-04-30T20:25:28Z","pushed_at":"2015-08-20T18:09:05Z","git_url":"git://github.com/Narretz/angular.js.git","ssh_url":"git@github.com:Narretz/angular.js.git","clone_url":"https://github.com/Narretz/angular.js.git","svn_url":"https://github.com/Narretz/angular.js","homepage":"http://angularjs.org","size":68234,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"dc48aadd26bbf1797c1c408f63ffde99d67414a9","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":460078,"name":"angular.js","full_name":"angular/angular.js","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.js","description":"HTML enhanced for web apps","fork":false,"url":"https://api.github.com/repos/angular/angular.js","forks_url":"https://api.github.com/repos/angular/angular.js/forks","keys_url":"https://api.github.com/repos/angular/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.js/teams","hooks_url":"https://api.github.com/repos/angular/angular.js/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.js/events","assignees_url":"https://api.github.com/repos/angular/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.js/tags","blobs_url":"https://api.github.com/repos/angular/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.js/languages","stargazers_url":"https://api.github.com/repos/angular/angular.js/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.js/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.js/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.js/subscription","commits_url":"https://api.github.com/repos/angular/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.js/merges","archive_url":"https://api.github.com/repos/angular/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.js/downloads","issues_url":"https://api.github.com/repos/angular/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.js/releases{/id}","created_at":"2010-01-06T00:34:37Z","updated_at":"2015-08-20T21:30:02Z","pushed_at":"2015-08-20T21:34:09Z","git_url":"git://github.com/angular/angular.js.git","ssh_url":"git@github.com:angular/angular.js.git","clone_url":"https://github.com/angular/angular.js.git","svn_url":"https://github.com/angular/angular.js","homepage":"http://angularjs.org","size":258410,"stargazers_count":41791,"watchers_count":41791,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18459,"mirror_url":null,"open_issues_count":1271,"forks":18459,"open_issues":1271,"watchers":41791,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12640"},"html":{"href":"https://github.com/angular/angular.js/pull/12640"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/12640"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/12640/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12640/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.js/pulls/12640/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/459daca7aaaf8e70167de5aaabdc039db69898ab"}}}}