{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/joi/issues/445","labels_url":"https://api.github.com/repos/hapijs/joi/issues/445/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/joi/issues/445/comments","events_url":"https://api.github.com/repos/hapijs/joi/issues/445/events","html_url":"https://github.com/hapijs/joi/issues/445","id":43922927,"number":445,"title":"Get validation error object in key:message pairs","user":{"login":"manV","id":4988376,"avatar_url":"https://avatars.githubusercontent.com/u/4988376?v=3","gravatar_id":"","url":"https://api.github.com/users/manV","html_url":"https://github.com/manV","followers_url":"https://api.github.com/users/manV/followers","following_url":"https://api.github.com/users/manV/following{/other_user}","gists_url":"https://api.github.com/users/manV/gists{/gist_id}","starred_url":"https://api.github.com/users/manV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manV/subscriptions","organizations_url":"https://api.github.com/users/manV/orgs","repos_url":"https://api.github.com/users/manV/repos","events_url":"https://api.github.com/users/manV/events{/privacy}","received_events_url":"https://api.github.com/users/manV/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hapijs/joi/labels/request","name":"request","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"Marsup","id":796194,"avatar_url":"https://avatars.githubusercontent.com/u/796194?v=3","gravatar_id":"","url":"https://api.github.com/users/Marsup","html_url":"https://github.com/Marsup","followers_url":"https://api.github.com/users/Marsup/followers","following_url":"https://api.github.com/users/Marsup/following{/other_user}","gists_url":"https://api.github.com/users/Marsup/gists{/gist_id}","starred_url":"https://api.github.com/users/Marsup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marsup/subscriptions","organizations_url":"https://api.github.com/users/Marsup/orgs","repos_url":"https://api.github.com/users/Marsup/repos","events_url":"https://api.github.com/users/Marsup/events{/privacy}","received_events_url":"https://api.github.com/users/Marsup/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2014-09-25T14:07:04Z","updated_at":"2015-01-21T18:09:56Z","closed_at":null,"body":"any way I can get validation errors in array of {key:message} format? instead of a message field containing all validation messages and array of keys separately? It is needed to display error messages with appropriate input boxes. "},"comment":{"url":"https://api.github.com/repos/hapijs/joi/issues/comments/70889538","html_url":"https://github.com/hapijs/joi/issues/445#issuecomment-70889538","issue_url":"https://api.github.com/repos/hapijs/joi/issues/445","id":70889538,"user":{"login":"SevereOverfl0w","id":6136282,"avatar_url":"https://avatars.githubusercontent.com/u/6136282?v=3","gravatar_id":"","url":"https://api.github.com/users/SevereOverfl0w","html_url":"https://github.com/SevereOverfl0w","followers_url":"https://api.github.com/users/SevereOverfl0w/followers","following_url":"https://api.github.com/users/SevereOverfl0w/following{/other_user}","gists_url":"https://api.github.com/users/SevereOverfl0w/gists{/gist_id}","starred_url":"https://api.github.com/users/SevereOverfl0w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SevereOverfl0w/subscriptions","organizations_url":"https://api.github.com/users/SevereOverfl0w/orgs","repos_url":"https://api.github.com/users/SevereOverfl0w/repos","events_url":"https://api.github.com/users/SevereOverfl0w/events{/privacy}","received_events_url":"https://api.github.com/users/SevereOverfl0w/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T18:09:56Z","updated_at":"2015-01-21T18:09:56Z","body":"Definitely something that needs looking at. When you're validating a form, you want to return all of the errors, with the appropriate errors attached to each form input.\r\n\r\n\r\nIn regards to not breaking backwards compatibility, how about offering an option which defaults to false?\r\nI think something like this might be a good response: \r\n\r\nkey: ['msg1', 'msg2'], As a given key can have multiple errors."}}