{"action":"created","comment":{"url":"https://api.github.com/repos/catarse/catarse.js/pulls/comments/41870476","id":41870476,"diff_hunk":"@@ -35,7 +35,11 @@ window.c.AdminContributionDetail = (function(m, _, c, h){\n             outerLabel: 'Recompensa',\n             getModel: c.models.rewardDetail,\n             updateModel: c.models.contributionDetail,\n-            selectedItem: reward\n+            selectedItem: reward,\n+            validate: (newRewardValue) => {\n+              return (args.item.value > newRewardValue) ? true : false;\n+            },\n+            validateErrorMessage: 'Valor mínimo da recompensa é maior do que o valor da contribuição.'","path":"src/c/admin-contribution-detail.js","position":9,"original_position":9,"commit_id":"6ac20ca84305f666c389524e47c153eff885982c","original_commit_id":"6ac20ca84305f666c389524e47c153eff885982c","user":{"login":"diogob","id":20662,"avatar_url":"https://avatars.githubusercontent.com/u/20662?v=3","gravatar_id":"","url":"https://api.github.com/users/diogob","html_url":"https://github.com/diogob","followers_url":"https://api.github.com/users/diogob/followers","following_url":"https://api.github.com/users/diogob/following{/other_user}","gists_url":"https://api.github.com/users/diogob/gists{/gist_id}","starred_url":"https://api.github.com/users/diogob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diogob/subscriptions","organizations_url":"https://api.github.com/users/diogob/orgs","repos_url":"https://api.github.com/users/diogob/repos","events_url":"https://api.github.com/users/diogob/events{/privacy}","received_events_url":"https://api.github.com/users/diogob/received_events","type":"User","site_admin":false},"body":"I would change the validate interface and return this error message.\r\nWhen validate function return undefined is because everything went fine.\r\nThe function would be something like:\r\n```javascript\r\nvalidate: (newRewardValue) => {\r\nreturn (args.item.value > newRewardValue) ? undefined : 'Valor mínimo da recompensa é maior do que o valor da contribuição.';\r\n}\r\n```","created_at":"2015-10-13T14:16:21Z","updated_at":"2015-10-13T14:16:21Z","html_url":"https://github.com/catarse/catarse.js/pull/70#discussion_r41870476","pull_request_url":"https://api.github.com/repos/catarse/catarse.js/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/catarse/catarse.js/pulls/comments/41870476"},"html":{"href":"https://github.com/catarse/catarse.js/pull/70#discussion_r41870476"},"pull_request":{"href":"https://api.github.com/repos/catarse/catarse.js/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/catarse/catarse.js/pulls/70","id":47347905,"html_url":"https://github.com/catarse/catarse.js/pull/70","diff_url":"https://github.com/catarse/catarse.js/pull/70.diff","patch_url":"https://github.com/catarse/catarse.js/pull/70.patch","issue_url":"https://api.github.com/repos/catarse/catarse.js/issues/70","number":70,"state":"open","locked":false,"title":"Admin contribution validation","user":{"login":"vicnicius","id":1326024,"avatar_url":"https://avatars.githubusercontent.com/u/1326024?v=3","gravatar_id":"","url":"https://api.github.com/users/vicnicius","html_url":"https://github.com/vicnicius","followers_url":"https://api.github.com/users/vicnicius/followers","following_url":"https://api.github.com/users/vicnicius/following{/other_user}","gists_url":"https://api.github.com/users/vicnicius/gists{/gist_id}","starred_url":"https://api.github.com/users/vicnicius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicnicius/subscriptions","organizations_url":"https://api.github.com/users/vicnicius/orgs","repos_url":"https://api.github.com/users/vicnicius/repos","events_url":"https://api.github.com/users/vicnicius/events{/privacy}","received_events_url":"https://api.github.com/users/vicnicius/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-10T15:42:58Z","updated_at":"2015-10-13T14:16:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6493a03de4d3c2024b6a6a24d25aa0da3c3e87d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/catarse/catarse.js/pulls/70/commits","review_comments_url":"https://api.github.com/repos/catarse/catarse.js/pulls/70/comments","review_comment_url":"https://api.github.com/repos/catarse/catarse.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/catarse/catarse.js/issues/70/comments","statuses_url":"https://api.github.com/repos/catarse/catarse.js/statuses/6ac20ca84305f666c389524e47c153eff885982c","head":{"label":"vicnicius:Admin_contribution_validation","ref":"Admin_contribution_validation","sha":"6ac20ca84305f666c389524e47c153eff885982c","user":{"login":"vicnicius","id":1326024,"avatar_url":"https://avatars.githubusercontent.com/u/1326024?v=3","gravatar_id":"","url":"https://api.github.com/users/vicnicius","html_url":"https://github.com/vicnicius","followers_url":"https://api.github.com/users/vicnicius/followers","following_url":"https://api.github.com/users/vicnicius/following{/other_user}","gists_url":"https://api.github.com/users/vicnicius/gists{/gist_id}","starred_url":"https://api.github.com/users/vicnicius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicnicius/subscriptions","organizations_url":"https://api.github.com/users/vicnicius/orgs","repos_url":"https://api.github.com/users/vicnicius/repos","events_url":"https://api.github.com/users/vicnicius/events{/privacy}","received_events_url":"https://api.github.com/users/vicnicius/received_events","type":"User","site_admin":false},"repo":{"id":37484040,"name":"catarse_admin","full_name":"vicnicius/catarse_admin","owner":{"login":"vicnicius","id":1326024,"avatar_url":"https://avatars.githubusercontent.com/u/1326024?v=3","gravatar_id":"","url":"https://api.github.com/users/vicnicius","html_url":"https://github.com/vicnicius","followers_url":"https://api.github.com/users/vicnicius/followers","following_url":"https://api.github.com/users/vicnicius/following{/other_user}","gists_url":"https://api.github.com/users/vicnicius/gists{/gist_id}","starred_url":"https://api.github.com/users/vicnicius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicnicius/subscriptions","organizations_url":"https://api.github.com/users/vicnicius/orgs","repos_url":"https://api.github.com/users/vicnicius/repos","events_url":"https://api.github.com/users/vicnicius/events{/privacy}","received_events_url":"https://api.github.com/users/vicnicius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vicnicius/catarse_admin","description":"Catarse Admin Front End","fork":true,"url":"https://api.github.com/repos/vicnicius/catarse_admin","forks_url":"https://api.github.com/repos/vicnicius/catarse_admin/forks","keys_url":"https://api.github.com/repos/vicnicius/catarse_admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vicnicius/catarse_admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vicnicius/catarse_admin/teams","hooks_url":"https://api.github.com/repos/vicnicius/catarse_admin/hooks","issue_events_url":"https://api.github.com/repos/vicnicius/catarse_admin/issues/events{/number}","events_url":"https://api.github.com/repos/vicnicius/catarse_admin/events","assignees_url":"https://api.github.com/repos/vicnicius/catarse_admin/assignees{/user}","branches_url":"https://api.github.com/repos/vicnicius/catarse_admin/branches{/branch}","tags_url":"https://api.github.com/repos/vicnicius/catarse_admin/tags","blobs_url":"https://api.github.com/repos/vicnicius/catarse_admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vicnicius/catarse_admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vicnicius/catarse_admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/vicnicius/catarse_admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vicnicius/catarse_admin/statuses/{sha}","languages_url":"https://api.github.com/repos/vicnicius/catarse_admin/languages","stargazers_url":"https://api.github.com/repos/vicnicius/catarse_admin/stargazers","contributors_url":"https://api.github.com/repos/vicnicius/catarse_admin/contributors","subscribers_url":"https://api.github.com/repos/vicnicius/catarse_admin/subscribers","subscription_url":"https://api.github.com/repos/vicnicius/catarse_admin/subscription","commits_url":"https://api.github.com/repos/vicnicius/catarse_admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/vicnicius/catarse_admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/vicnicius/catarse_admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/vicnicius/catarse_admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/vicnicius/catarse_admin/contents/{+path}","compare_url":"https://api.github.com/repos/vicnicius/catarse_admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vicnicius/catarse_admin/merges","archive_url":"https://api.github.com/repos/vicnicius/catarse_admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vicnicius/catarse_admin/downloads","issues_url":"https://api.github.com/repos/vicnicius/catarse_admin/issues{/number}","pulls_url":"https://api.github.com/repos/vicnicius/catarse_admin/pulls{/number}","milestones_url":"https://api.github.com/repos/vicnicius/catarse_admin/milestones{/number}","notifications_url":"https://api.github.com/repos/vicnicius/catarse_admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vicnicius/catarse_admin/labels{/name}","releases_url":"https://api.github.com/repos/vicnicius/catarse_admin/releases{/id}","created_at":"2015-06-15T18:40:46Z","updated_at":"2015-06-15T18:40:47Z","pushed_at":"2015-10-10T15:42:21Z","git_url":"git://github.com/vicnicius/catarse_admin.git","ssh_url":"git@github.com:vicnicius/catarse_admin.git","clone_url":"https://github.com/vicnicius/catarse_admin.git","svn_url":"https://github.com/vicnicius/catarse_admin","homepage":null,"size":3064,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"catarse:master","ref":"master","sha":"9b290a8a649c109c4fe7d5eb44ac73c5050fa9da","user":{"login":"catarse","id":721161,"avatar_url":"https://avatars.githubusercontent.com/u/721161?v=3","gravatar_id":"","url":"https://api.github.com/users/catarse","html_url":"https://github.com/catarse","followers_url":"https://api.github.com/users/catarse/followers","following_url":"https://api.github.com/users/catarse/following{/other_user}","gists_url":"https://api.github.com/users/catarse/gists{/gist_id}","starred_url":"https://api.github.com/users/catarse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catarse/subscriptions","organizations_url":"https://api.github.com/users/catarse/orgs","repos_url":"https://api.github.com/users/catarse/repos","events_url":"https://api.github.com/users/catarse/events{/privacy}","received_events_url":"https://api.github.com/users/catarse/received_events","type":"Organization","site_admin":false},"repo":{"id":37343900,"name":"catarse.js","full_name":"catarse/catarse.js","owner":{"login":"catarse","id":721161,"avatar_url":"https://avatars.githubusercontent.com/u/721161?v=3","gravatar_id":"","url":"https://api.github.com/users/catarse","html_url":"https://github.com/catarse","followers_url":"https://api.github.com/users/catarse/followers","following_url":"https://api.github.com/users/catarse/following{/other_user}","gists_url":"https://api.github.com/users/catarse/gists{/gist_id}","starred_url":"https://api.github.com/users/catarse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catarse/subscriptions","organizations_url":"https://api.github.com/users/catarse/orgs","repos_url":"https://api.github.com/users/catarse/repos","events_url":"https://api.github.com/users/catarse/events{/privacy}","received_events_url":"https://api.github.com/users/catarse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/catarse/catarse.js","description":"Mithril components for the Catarse world","fork":false,"url":"https://api.github.com/repos/catarse/catarse.js","forks_url":"https://api.github.com/repos/catarse/catarse.js/forks","keys_url":"https://api.github.com/repos/catarse/catarse.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/catarse/catarse.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/catarse/catarse.js/teams","hooks_url":"https://api.github.com/repos/catarse/catarse.js/hooks","issue_events_url":"https://api.github.com/repos/catarse/catarse.js/issues/events{/number}","events_url":"https://api.github.com/repos/catarse/catarse.js/events","assignees_url":"https://api.github.com/repos/catarse/catarse.js/assignees{/user}","branches_url":"https://api.github.com/repos/catarse/catarse.js/branches{/branch}","tags_url":"https://api.github.com/repos/catarse/catarse.js/tags","blobs_url":"https://api.github.com/repos/catarse/catarse.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/catarse/catarse.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/catarse/catarse.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/catarse/catarse.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/catarse/catarse.js/statuses/{sha}","languages_url":"https://api.github.com/repos/catarse/catarse.js/languages","stargazers_url":"https://api.github.com/repos/catarse/catarse.js/stargazers","contributors_url":"https://api.github.com/repos/catarse/catarse.js/contributors","subscribers_url":"https://api.github.com/repos/catarse/catarse.js/subscribers","subscription_url":"https://api.github.com/repos/catarse/catarse.js/subscription","commits_url":"https://api.github.com/repos/catarse/catarse.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/catarse/catarse.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/catarse/catarse.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/catarse/catarse.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/catarse/catarse.js/contents/{+path}","compare_url":"https://api.github.com/repos/catarse/catarse.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/catarse/catarse.js/merges","archive_url":"https://api.github.com/repos/catarse/catarse.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/catarse/catarse.js/downloads","issues_url":"https://api.github.com/repos/catarse/catarse.js/issues{/number}","pulls_url":"https://api.github.com/repos/catarse/catarse.js/pulls{/number}","milestones_url":"https://api.github.com/repos/catarse/catarse.js/milestones{/number}","notifications_url":"https://api.github.com/repos/catarse/catarse.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/catarse/catarse.js/labels{/name}","releases_url":"https://api.github.com/repos/catarse/catarse.js/releases{/id}","created_at":"2015-06-12T20:49:31Z","updated_at":"2015-09-28T15:39:12Z","pushed_at":"2015-10-13T11:29:22Z","git_url":"git://github.com/catarse/catarse.js.git","ssh_url":"git@github.com:catarse/catarse.js.git","clone_url":"https://github.com/catarse/catarse.js.git","svn_url":"https://github.com/catarse/catarse.js","homepage":"","size":3958,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/catarse/catarse.js/pulls/70"},"html":{"href":"https://github.com/catarse/catarse.js/pull/70"},"issue":{"href":"https://api.github.com/repos/catarse/catarse.js/issues/70"},"comments":{"href":"https://api.github.com/repos/catarse/catarse.js/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/catarse/catarse.js/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/catarse/catarse.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/catarse/catarse.js/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/catarse/catarse.js/statuses/6ac20ca84305f666c389524e47c153eff885982c"}}}}