{"action":"opened","issue":{"url":"https://api.github.com/repos/christianalfoni/cerebral-baobab/issues/2","labels_url":"https://api.github.com/repos/christianalfoni/cerebral-baobab/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/christianalfoni/cerebral-baobab/issues/2/comments","events_url":"https://api.github.com/repos/christianalfoni/cerebral-baobab/issues/2/events","html_url":"https://github.com/christianalfoni/cerebral-baobab/issues/2","id":102543102,"number":2,"title":"Support validation to a greater degree","user":{"login":"saulshanabrook","id":1186124,"avatar_url":"https://avatars.githubusercontent.com/u/1186124?v=3","gravatar_id":"","url":"https://api.github.com/users/saulshanabrook","html_url":"https://github.com/saulshanabrook","followers_url":"https://api.github.com/users/saulshanabrook/followers","following_url":"https://api.github.com/users/saulshanabrook/following{/other_user}","gists_url":"https://api.github.com/users/saulshanabrook/gists{/gist_id}","starred_url":"https://api.github.com/users/saulshanabrook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saulshanabrook/subscriptions","organizations_url":"https://api.github.com/users/saulshanabrook/orgs","repos_url":"https://api.github.com/users/saulshanabrook/repos","events_url":"https://api.github.com/users/saulshanabrook/events{/privacy}","received_events_url":"https://api.github.com/users/saulshanabrook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-22T14:55:04Z","updated_at":"2015-08-22T14:55:04Z","closed_at":null,"body":"I am using the `validate` option in baobab and that is working great. However, I would love to be able to handle when the tree is called with something invalid. In baobab, you [would do](https://github.com/Yomguithereal/baobab/tree/v2#tree-level-1):\r\n\r\n```\r\ntree.on('invalid', function(e) {\r\n  console.log('Error:', e.data.error);\r\n});\r\n```\r\n\r\nSo it would be nice to be able to access this in some way from cerebral, maybe by using a cerebral event.\r\n\r\nI also opened https://github.com/christianalfoni/cerebral/issues/77 which would address this by supporting validation natively within cerebral and so would render this not neccesary."}}