{"action":"opened","issue":{"url":"https://api.github.com/repos/hapijs/joi/issues/1348","repository_url":"https://api.github.com/repos/hapijs/joi","labels_url":"https://api.github.com/repos/hapijs/joi/issues/1348/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/joi/issues/1348/comments","events_url":"https://api.github.com/repos/hapijs/joi/issues/1348/events","html_url":"https://github.com/hapijs/joi/issues/1348","id":271212514,"number":1348,"title":"joi.valid with object or array","user":{"login":"rightaway","id":3680078,"avatar_url":"https://avatars0.githubusercontent.com/u/3680078?v=4","gravatar_id":"","url":"https://api.github.com/users/rightaway","html_url":"https://github.com/rightaway","followers_url":"https://api.github.com/users/rightaway/followers","following_url":"https://api.github.com/users/rightaway/following{/other_user}","gists_url":"https://api.github.com/users/rightaway/gists{/gist_id}","starred_url":"https://api.github.com/users/rightaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rightaway/subscriptions","organizations_url":"https://api.github.com/users/rightaway/orgs","repos_url":"https://api.github.com/users/rightaway/repos","events_url":"https://api.github.com/users/rightaway/events{/privacy}","received_events_url":"https://api.github.com/users/rightaway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-04T18:14:48Z","updated_at":"2017-11-04T18:14:48Z","closed_at":null,"author_association":"NONE","body":"I want to validate that an object key is exactly equal to something. But if I do\r\n\r\n```js\r\njoi.valid({ a:1, b:2 })\r\n```\r\n\r\nit doesn't match that the object exactly equals `{ a:1, b: 2 }`. Same with arrays, doing `joi.valid([1, 2, 3 ])` checks that the values can be either 1, 2, or 3, rather than verifying that it's exactly equal to `[1, 2, 3]`. How can I make this work?\r\n\r\nCould some kind of `joi.deepEqual` be added? It's useful for cases where let's say you're receiving something back from a JSON API and need to make sure that some of the keys meet some criteria, but other keys need to exactly equal something."}}
{"actor":{"display_login":"rightaway"}}