{"action":"closed","issue":{"url":"https://api.github.com/repos/scup/speck/issues/2","repository_url":"https://api.github.com/repos/scup/speck","labels_url":"https://api.github.com/repos/scup/speck/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/scup/speck/issues/2/comments","events_url":"https://api.github.com/repos/scup/speck/issues/2/events","html_url":"https://github.com/scup/speck/issues/2","id":164586236,"number":2,"title":"Doesn't show valid attribute","user":{"login":"LucasDaiki","id":10747020,"avatar_url":"https://avatars.githubusercontent.com/u/10747020?v=3","gravatar_id":"","url":"https://api.github.com/users/LucasDaiki","html_url":"https://github.com/LucasDaiki","followers_url":"https://api.github.com/users/LucasDaiki/followers","following_url":"https://api.github.com/users/LucasDaiki/following{/other_user}","gists_url":"https://api.github.com/users/LucasDaiki/gists{/gist_id}","starred_url":"https://api.github.com/users/LucasDaiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucasDaiki/subscriptions","organizations_url":"https://api.github.com/users/LucasDaiki/orgs","repos_url":"https://api.github.com/users/LucasDaiki/repos","events_url":"https://api.github.com/users/LucasDaiki/events{/privacy}","received_events_url":"https://api.github.com/users/LucasDaiki/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scup/speck/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-08T18:13:49Z","updated_at":"2016-07-25T21:31:47Z","closed_at":"2016-07-25T21:31:47Z","body":"The errors object should has a valid attribute.\r\nEg.:\r\n```\r\n  static SCHEMA = {\r\n    title: titleValidator\r\n  }\r\n\r\n\r\nfunction titleValidator(obj, field) {\r\n  if (!obj[field]) {\r\n    return new Error(\"Title can't be empty\");\r\n  }\r\n}\r\n```\r\nResponse\r\n`Entity = { \r\n \"errors\":{\r\n   \"title\":{\r\n     \"errors\":[\"Title can't be empty\"]\r\n   },\r\n \"valid\":false\r\n}`\r\n\r\nExpected\r\n`Entity =  { \r\n \"errors\":{\r\n   \"title\":{\r\n     \"errors\":[\"Title can't be empty\"],\r\n     \"valid\":false\r\n   },\r\n \"valid\":false\r\n}` "}}
{"actor":{"display_login":"guisouza"}}