{"action":"created","comment":{"url":"https://api.github.com/repos/behance/nbd.php-validation/pulls/comments/51499962","id":51499962,"diff_hunk":"@@ -497,6 +497,26 @@ public function getAllFieldErrorTemplates() {\n \n \n   /**\n+   * @param  string  $field\n+   *\n+   * @return string\n+   */\n+  public function getFieldErrorContext( $field ) {\n+\n+    if ( !isset( $this->_errors[ $field ] ) ) {\n+      return '';\n+    }\n+\n+    $error = $this->_errors[ $field ];\n+\n+    return ( $error instanceof ErrorFormatter )\n+           ? $error->getContext()\n+           : $error;","path":"src/Validation/Services/ValidatorService.php","position":18,"original_position":18,"commit_id":"4f35f09d846c00ffc618a094b0101504884310ba","original_commit_id":"4f35f09d846c00ffc618a094b0101504884310ba","user":{"login":"markdunphy","id":1442186,"avatar_url":"https://avatars.githubusercontent.com/u/1442186?v=3","gravatar_id":"","url":"https://api.github.com/users/markdunphy","html_url":"https://github.com/markdunphy","followers_url":"https://api.github.com/users/markdunphy/followers","following_url":"https://api.github.com/users/markdunphy/following{/other_user}","gists_url":"https://api.github.com/users/markdunphy/gists{/gist_id}","starred_url":"https://api.github.com/users/markdunphy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdunphy/subscriptions","organizations_url":"https://api.github.com/users/markdunphy/orgs","repos_url":"https://api.github.com/users/markdunphy/repos","events_url":"https://api.github.com/users/markdunphy/events{/privacy}","received_events_url":"https://api.github.com/users/markdunphy/received_events","type":"User","site_admin":false},"body":"What else can `$error` be if not an instance of `ErrorFormatter`?","created_at":"2016-02-01T23:38:27Z","updated_at":"2016-02-01T23:38:27Z","html_url":"https://github.com/behance/nbd.php-validation/pull/29#discussion_r51499962","pull_request_url":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/behance/nbd.php-validation/pulls/comments/51499962"},"html":{"href":"https://github.com/behance/nbd.php-validation/pull/29#discussion_r51499962"},"pull_request":{"href":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29","id":57913397,"html_url":"https://github.com/behance/nbd.php-validation/pull/29","diff_url":"https://github.com/behance/nbd.php-validation/pull/29.diff","patch_url":"https://github.com/behance/nbd.php-validation/pull/29.patch","issue_url":"https://api.github.com/repos/behance/nbd.php-validation/issues/29","number":29,"state":"open","locked":false,"title":"ValidatorService: add getErrorContextByField method","user":{"login":"andyroo2000","id":13655,"avatar_url":"https://avatars.githubusercontent.com/u/13655?v=3","gravatar_id":"","url":"https://api.github.com/users/andyroo2000","html_url":"https://github.com/andyroo2000","followers_url":"https://api.github.com/users/andyroo2000/followers","following_url":"https://api.github.com/users/andyroo2000/following{/other_user}","gists_url":"https://api.github.com/users/andyroo2000/gists{/gist_id}","starred_url":"https://api.github.com/users/andyroo2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyroo2000/subscriptions","organizations_url":"https://api.github.com/users/andyroo2000/orgs","repos_url":"https://api.github.com/users/andyroo2000/repos","events_url":"https://api.github.com/users/andyroo2000/events{/privacy}","received_events_url":"https://api.github.com/users/andyroo2000/received_events","type":"User","site_admin":false},"body":"![image](https://cloud.githubusercontent.com/assets/13655/12734068/5206f248-c90c-11e5-9134-8671ca776ff3.png)\r\n","created_at":"2016-02-01T22:50:52Z","updated_at":"2016-02-01T23:38:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b5987e09412dc577841b5b9df6f9287f8c2e512","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29/commits","review_comments_url":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29/comments","review_comment_url":"https://api.github.com/repos/behance/nbd.php-validation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/behance/nbd.php-validation/issues/29/comments","statuses_url":"https://api.github.com/repos/behance/nbd.php-validation/statuses/4f35f09d846c00ffc618a094b0101504884310ba","head":{"label":"andyroo2000:validator-service-add-get-errror-context-by-field","ref":"validator-service-add-get-errror-context-by-field","sha":"4f35f09d846c00ffc618a094b0101504884310ba","user":{"login":"andyroo2000","id":13655,"avatar_url":"https://avatars.githubusercontent.com/u/13655?v=3","gravatar_id":"","url":"https://api.github.com/users/andyroo2000","html_url":"https://github.com/andyroo2000","followers_url":"https://api.github.com/users/andyroo2000/followers","following_url":"https://api.github.com/users/andyroo2000/following{/other_user}","gists_url":"https://api.github.com/users/andyroo2000/gists{/gist_id}","starred_url":"https://api.github.com/users/andyroo2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyroo2000/subscriptions","organizations_url":"https://api.github.com/users/andyroo2000/orgs","repos_url":"https://api.github.com/users/andyroo2000/repos","events_url":"https://api.github.com/users/andyroo2000/events{/privacy}","received_events_url":"https://api.github.com/users/andyroo2000/received_events","type":"User","site_admin":false},"repo":{"id":50458919,"name":"nbd.php-validation","full_name":"andyroo2000/nbd.php-validation","owner":{"login":"andyroo2000","id":13655,"avatar_url":"https://avatars.githubusercontent.com/u/13655?v=3","gravatar_id":"","url":"https://api.github.com/users/andyroo2000","html_url":"https://github.com/andyroo2000","followers_url":"https://api.github.com/users/andyroo2000/followers","following_url":"https://api.github.com/users/andyroo2000/following{/other_user}","gists_url":"https://api.github.com/users/andyroo2000/gists{/gist_id}","starred_url":"https://api.github.com/users/andyroo2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyroo2000/subscriptions","organizations_url":"https://api.github.com/users/andyroo2000/orgs","repos_url":"https://api.github.com/users/andyroo2000/repos","events_url":"https://api.github.com/users/andyroo2000/events{/privacy}","received_events_url":"https://api.github.com/users/andyroo2000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andyroo2000/nbd.php-validation","description":"Validation Component of NBD.php","fork":true,"url":"https://api.github.com/repos/andyroo2000/nbd.php-validation","forks_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/forks","keys_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/teams","hooks_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/hooks","issue_events_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/issues/events{/number}","events_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/events","assignees_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/assignees{/user}","branches_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/branches{/branch}","tags_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/tags","blobs_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/statuses/{sha}","languages_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/languages","stargazers_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/stargazers","contributors_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/contributors","subscribers_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/subscribers","subscription_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/subscription","commits_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/contents/{+path}","compare_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/merges","archive_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/downloads","issues_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/issues{/number}","pulls_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/pulls{/number}","milestones_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/milestones{/number}","notifications_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/labels{/name}","releases_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/releases{/id}","deployments_url":"https://api.github.com/repos/andyroo2000/nbd.php-validation/deployments","created_at":"2016-01-26T21:01:27Z","updated_at":"2016-01-26T21:01:28Z","pushed_at":"2016-02-01T22:49:14Z","git_url":"git://github.com/andyroo2000/nbd.php-validation.git","ssh_url":"git@github.com:andyroo2000/nbd.php-validation.git","clone_url":"https://github.com/andyroo2000/nbd.php-validation.git","svn_url":"https://github.com/andyroo2000/nbd.php-validation","homepage":null,"size":115,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"behance:master","ref":"master","sha":"d3d5f038c453659a3b9b7698b0da59a74e652953","user":{"login":"behance","id":1197743,"avatar_url":"https://avatars.githubusercontent.com/u/1197743?v=3","gravatar_id":"","url":"https://api.github.com/users/behance","html_url":"https://github.com/behance","followers_url":"https://api.github.com/users/behance/followers","following_url":"https://api.github.com/users/behance/following{/other_user}","gists_url":"https://api.github.com/users/behance/gists{/gist_id}","starred_url":"https://api.github.com/users/behance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behance/subscriptions","organizations_url":"https://api.github.com/users/behance/orgs","repos_url":"https://api.github.com/users/behance/repos","events_url":"https://api.github.com/users/behance/events{/privacy}","received_events_url":"https://api.github.com/users/behance/received_events","type":"Organization","site_admin":false},"repo":{"id":24383000,"name":"nbd.php-validation","full_name":"behance/nbd.php-validation","owner":{"login":"behance","id":1197743,"avatar_url":"https://avatars.githubusercontent.com/u/1197743?v=3","gravatar_id":"","url":"https://api.github.com/users/behance","html_url":"https://github.com/behance","followers_url":"https://api.github.com/users/behance/followers","following_url":"https://api.github.com/users/behance/following{/other_user}","gists_url":"https://api.github.com/users/behance/gists{/gist_id}","starred_url":"https://api.github.com/users/behance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behance/subscriptions","organizations_url":"https://api.github.com/users/behance/orgs","repos_url":"https://api.github.com/users/behance/repos","events_url":"https://api.github.com/users/behance/events{/privacy}","received_events_url":"https://api.github.com/users/behance/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/behance/nbd.php-validation","description":"Validation Component of NBD.php","fork":false,"url":"https://api.github.com/repos/behance/nbd.php-validation","forks_url":"https://api.github.com/repos/behance/nbd.php-validation/forks","keys_url":"https://api.github.com/repos/behance/nbd.php-validation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/behance/nbd.php-validation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/behance/nbd.php-validation/teams","hooks_url":"https://api.github.com/repos/behance/nbd.php-validation/hooks","issue_events_url":"https://api.github.com/repos/behance/nbd.php-validation/issues/events{/number}","events_url":"https://api.github.com/repos/behance/nbd.php-validation/events","assignees_url":"https://api.github.com/repos/behance/nbd.php-validation/assignees{/user}","branches_url":"https://api.github.com/repos/behance/nbd.php-validation/branches{/branch}","tags_url":"https://api.github.com/repos/behance/nbd.php-validation/tags","blobs_url":"https://api.github.com/repos/behance/nbd.php-validation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/behance/nbd.php-validation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/behance/nbd.php-validation/git/refs{/sha}","trees_url":"https://api.github.com/repos/behance/nbd.php-validation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/behance/nbd.php-validation/statuses/{sha}","languages_url":"https://api.github.com/repos/behance/nbd.php-validation/languages","stargazers_url":"https://api.github.com/repos/behance/nbd.php-validation/stargazers","contributors_url":"https://api.github.com/repos/behance/nbd.php-validation/contributors","subscribers_url":"https://api.github.com/repos/behance/nbd.php-validation/subscribers","subscription_url":"https://api.github.com/repos/behance/nbd.php-validation/subscription","commits_url":"https://api.github.com/repos/behance/nbd.php-validation/commits{/sha}","git_commits_url":"https://api.github.com/repos/behance/nbd.php-validation/git/commits{/sha}","comments_url":"https://api.github.com/repos/behance/nbd.php-validation/comments{/number}","issue_comment_url":"https://api.github.com/repos/behance/nbd.php-validation/issues/comments{/number}","contents_url":"https://api.github.com/repos/behance/nbd.php-validation/contents/{+path}","compare_url":"https://api.github.com/repos/behance/nbd.php-validation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/behance/nbd.php-validation/merges","archive_url":"https://api.github.com/repos/behance/nbd.php-validation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/behance/nbd.php-validation/downloads","issues_url":"https://api.github.com/repos/behance/nbd.php-validation/issues{/number}","pulls_url":"https://api.github.com/repos/behance/nbd.php-validation/pulls{/number}","milestones_url":"https://api.github.com/repos/behance/nbd.php-validation/milestones{/number}","notifications_url":"https://api.github.com/repos/behance/nbd.php-validation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/behance/nbd.php-validation/labels{/name}","releases_url":"https://api.github.com/repos/behance/nbd.php-validation/releases{/id}","deployments_url":"https://api.github.com/repos/behance/nbd.php-validation/deployments","created_at":"2014-09-23T17:56:26Z","updated_at":"2016-01-26T04:52:28Z","pushed_at":"2016-02-01T22:50:53Z","git_url":"git://github.com/behance/nbd.php-validation.git","ssh_url":"git@github.com:behance/nbd.php-validation.git","clone_url":"https://github.com/behance/nbd.php-validation.git","svn_url":"https://github.com/behance/nbd.php-validation","homepage":null,"size":133,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29"},"html":{"href":"https://github.com/behance/nbd.php-validation/pull/29"},"issue":{"href":"https://api.github.com/repos/behance/nbd.php-validation/issues/29"},"comments":{"href":"https://api.github.com/repos/behance/nbd.php-validation/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/behance/nbd.php-validation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/behance/nbd.php-validation/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/behance/nbd.php-validation/statuses/4f35f09d846c00ffc618a094b0101504884310ba"}}}}