{"action":"created","comment":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/comments/22639223","id":22639223,"diff_hunk":"@@ -2569,7 +2569,7 @@ describe('relations', function () {\n       Person.create({ name: 'Wilma', addresses: addresses }, function(err, p) {\n         err.name.should.equal('ValidationError');\n         var expected = 'The `Person` instance is not valid. ';\n-        expected += 'Details: `addresses` contains invalid item: `work` (`street` can\\'t be blank).';\n+        expected += 'Details: `addresses: [ { id: \\u001b[32m\\'home\\'\\u001b[39m, street: \\u001b[32m\\'Home Street\\'\\u001b[39m },\\n  { id: \\u001b[32m\\'work\\'\\u001b[39m, street: \\u001b[32m\\'\\'\\u001b[39m } ]` contains invalid item: `work` (`street` can\\'t be blank).';","path":"test/relations.test.js","position":14,"original_position":14,"commit_id":"385a0ebabd371a683e5e8e4261c84e53f763b31f","original_commit_id":"385a0ebabd371a683e5e8e4261c84e53f763b31f","user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"body":"> Notice how an invalid item in an array is handled: the message contains id of the item, and then information about the error in this item only.\r\n\r\n> This patch should build on top of that and print only the invalid item in the message. Example:\r\n\r\nOn the second thought, that would be a much more involved change, let's leave it for another day.\r\n\r\nHowever, you still need to remove colour codes.","created_at":"2015-01-08T08:03:53Z","updated_at":"2015-01-08T08:03:53Z","html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/368#discussion_r22639223","pull_request_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368","_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/comments/22639223"},"html":{"href":"https://github.com/strongloop/loopback-datasource-juggler/pull/368#discussion_r22639223"},"pull_request":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368"}}},"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368","id":25767391,"html_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/368","diff_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/368.diff","patch_url":"https://github.com/strongloop/loopback-datasource-juggler/pull/368.patch","issue_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/368","number":368,"state":"open","locked":false,"title":"ValidationError messages include field value","user":{"login":"bitmage","id":312943,"avatar_url":"https://avatars.githubusercontent.com/u/312943?v=3","gravatar_id":"","url":"https://api.github.com/users/bitmage","html_url":"https://github.com/bitmage","followers_url":"https://api.github.com/users/bitmage/followers","following_url":"https://api.github.com/users/bitmage/following{/other_user}","gists_url":"https://api.github.com/users/bitmage/gists{/gist_id}","starred_url":"https://api.github.com/users/bitmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitmage/subscriptions","organizations_url":"https://api.github.com/users/bitmage/orgs","repos_url":"https://api.github.com/users/bitmage/repos","events_url":"https://api.github.com/users/bitmage/events{/privacy}","received_events_url":"https://api.github.com/users/bitmage/received_events","type":"User","site_admin":false},"body":"I modified the formatErrors() function to include the current value of the fields which have failed validation.\r\n\r\nThe format looks like this:\r\n\r\n```\r\nThe `Person` instance is not valid. Details: `id: 123456` can\\'t be set.\r\n```\r\n\r\nPlease let me know if that format is good, and I will update the test expectations to match.","created_at":"2014-12-09T18:58:18Z","updated_at":"2015-01-08T08:03:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51604e5ca1943db76089b6dbb69f9385fc8437a0","assignee":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368/commits","review_comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368/comments","review_comment_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/comments/{number}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/368/comments","statuses_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/statuses/385a0ebabd371a683e5e8e4261c84e53f763b31f","head":{"label":"TorchlightSoftware:clarify-validations","ref":"clarify-validations","sha":"385a0ebabd371a683e5e8e4261c84e53f763b31f","user":{"login":"TorchlightSoftware","id":2273296,"avatar_url":"https://avatars.githubusercontent.com/u/2273296?v=3","gravatar_id":"","url":"https://api.github.com/users/TorchlightSoftware","html_url":"https://github.com/TorchlightSoftware","followers_url":"https://api.github.com/users/TorchlightSoftware/followers","following_url":"https://api.github.com/users/TorchlightSoftware/following{/other_user}","gists_url":"https://api.github.com/users/TorchlightSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/TorchlightSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TorchlightSoftware/subscriptions","organizations_url":"https://api.github.com/users/TorchlightSoftware/orgs","repos_url":"https://api.github.com/users/TorchlightSoftware/repos","events_url":"https://api.github.com/users/TorchlightSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/TorchlightSoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":25888267,"name":"loopback-datasource-juggler","full_name":"TorchlightSoftware/loopback-datasource-juggler","owner":{"login":"TorchlightSoftware","id":2273296,"avatar_url":"https://avatars.githubusercontent.com/u/2273296?v=3","gravatar_id":"","url":"https://api.github.com/users/TorchlightSoftware","html_url":"https://github.com/TorchlightSoftware","followers_url":"https://api.github.com/users/TorchlightSoftware/followers","following_url":"https://api.github.com/users/TorchlightSoftware/following{/other_user}","gists_url":"https://api.github.com/users/TorchlightSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/TorchlightSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TorchlightSoftware/subscriptions","organizations_url":"https://api.github.com/users/TorchlightSoftware/orgs","repos_url":"https://api.github.com/users/TorchlightSoftware/repos","events_url":"https://api.github.com/users/TorchlightSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/TorchlightSoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TorchlightSoftware/loopback-datasource-juggler","description":"Connect Loopback to various Data Sources","fork":true,"url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler","forks_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/forks","keys_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/teams","hooks_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/hooks","issue_events_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/issues/events{/number}","events_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/events","assignees_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/assignees{/user}","branches_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/branches{/branch}","tags_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/tags","blobs_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/git/refs{/sha}","trees_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/statuses/{sha}","languages_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/languages","stargazers_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/stargazers","contributors_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/contributors","subscribers_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/subscribers","subscription_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/subscription","commits_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/commits{/sha}","git_commits_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/git/commits{/sha}","comments_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/comments{/number}","issue_comment_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/issues/comments/{number}","contents_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/contents/{+path}","compare_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/merges","archive_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/downloads","issues_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/issues{/number}","pulls_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/pulls{/number}","milestones_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/milestones{/number}","notifications_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/labels{/name}","releases_url":"https://api.github.com/repos/TorchlightSoftware/loopback-datasource-juggler/releases{/id}","created_at":"2014-10-28T20:17:32Z","updated_at":"2014-12-28T20:58:40Z","pushed_at":"2015-01-07T22:36:01Z","git_url":"git://github.com/TorchlightSoftware/loopback-datasource-juggler.git","ssh_url":"git@github.com:TorchlightSoftware/loopback-datasource-juggler.git","clone_url":"https://github.com/TorchlightSoftware/loopback-datasource-juggler.git","svn_url":"https://github.com/TorchlightSoftware/loopback-datasource-juggler","homepage":"www.strongloop.com","size":3744,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"strongloop:master","ref":"master","sha":"cf0d9f730b1062bceee1dc59a37c15ec912ea397","user":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"repo":{"id":10126908,"name":"loopback-datasource-juggler","full_name":"strongloop/loopback-datasource-juggler","owner":{"login":"strongloop","id":3020012,"avatar_url":"https://avatars.githubusercontent.com/u/3020012?v=3","gravatar_id":"","url":"https://api.github.com/users/strongloop","html_url":"https://github.com/strongloop","followers_url":"https://api.github.com/users/strongloop/followers","following_url":"https://api.github.com/users/strongloop/following{/other_user}","gists_url":"https://api.github.com/users/strongloop/gists{/gist_id}","starred_url":"https://api.github.com/users/strongloop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strongloop/subscriptions","organizations_url":"https://api.github.com/users/strongloop/orgs","repos_url":"https://api.github.com/users/strongloop/repos","events_url":"https://api.github.com/users/strongloop/events{/privacy}","received_events_url":"https://api.github.com/users/strongloop/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strongloop/loopback-datasource-juggler","description":"Connect Loopback to various Data Sources","fork":false,"url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler","forks_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/forks","keys_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/teams","hooks_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/hooks","issue_events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/events{/number}","events_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/events","assignees_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/assignees{/user}","branches_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/branches{/branch}","tags_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/tags","blobs_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/git/refs{/sha}","trees_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/statuses/{sha}","languages_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/languages","stargazers_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/stargazers","contributors_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/contributors","subscribers_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/subscribers","subscription_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/subscription","commits_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/commits{/sha}","git_commits_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/git/commits{/sha}","comments_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/comments{/number}","issue_comment_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/comments/{number}","contents_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/contents/{+path}","compare_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/merges","archive_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/downloads","issues_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues{/number}","pulls_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls{/number}","milestones_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/milestones{/number}","notifications_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/labels{/name}","releases_url":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/releases{/id}","created_at":"2013-05-17T15:56:04Z","updated_at":"2015-01-07T21:58:19Z","pushed_at":"2015-01-07T21:58:19Z","git_url":"git://github.com/strongloop/loopback-datasource-juggler.git","ssh_url":"git@github.com:strongloop/loopback-datasource-juggler.git","clone_url":"https://github.com/strongloop/loopback-datasource-juggler.git","svn_url":"https://github.com/strongloop/loopback-datasource-juggler","homepage":"www.strongloop.com","size":7460,"stargazers_count":49,"watchers_count":49,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":44,"mirror_url":null,"open_issues_count":97,"forks":44,"open_issues":97,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368"},"html":{"href":"https://github.com/strongloop/loopback-datasource-juggler/pull/368"},"issue":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/368"},"comments":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/issues/368/comments"},"review_comments":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368/comments"},"review_comment":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/pulls/368/commits"},"statuses":{"href":"https://api.github.com/repos/strongloop/loopback-datasource-juggler/statuses/385a0ebabd371a683e5e8e4261c84e53f763b31f"}}}}