{"action":"created","issue":{"url":"https://api.github.com/repos/typelevel/cats/issues/984","repository_url":"https://api.github.com/repos/typelevel/cats","labels_url":"https://api.github.com/repos/typelevel/cats/issues/984/labels{/name}","comments_url":"https://api.github.com/repos/typelevel/cats/issues/984/comments","events_url":"https://api.github.com/repos/typelevel/cats/issues/984/events","html_url":"https://github.com/typelevel/cats/pull/984","id":148835711,"number":984,"title":"Add Validated.ensure","user":{"login":"markus1189","id":591567,"avatar_url":"https://avatars.githubusercontent.com/u/591567?v=3","gravatar_id":"","url":"https://api.github.com/users/markus1189","html_url":"https://github.com/markus1189","followers_url":"https://api.github.com/users/markus1189/followers","following_url":"https://api.github.com/users/markus1189/following{/other_user}","gists_url":"https://api.github.com/users/markus1189/gists{/gist_id}","starred_url":"https://api.github.com/users/markus1189/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus1189/subscriptions","organizations_url":"https://api.github.com/users/markus1189/orgs","repos_url":"https://api.github.com/users/markus1189/repos","events_url":"https://api.github.com/users/markus1189/events{/privacy}","received_events_url":"https://api.github.com/users/markus1189/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-16T09:12:14Z","updated_at":"2016-04-16T16:55:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/typelevel/cats/pulls/984","html_url":"https://github.com/typelevel/cats/pull/984","diff_url":"https://github.com/typelevel/cats/pull/984.diff","patch_url":"https://github.com/typelevel/cats/pull/984.patch"},"body":"Adds the `ensure` method known from `Xor` to `Validated`:\r\n\r\n```\r\nscala> Validated.valid(\"\").ensure(new IllegalArgumentException(\"Must not be empty\"))(_.nonEmpty)\r\nres0: Validated[IllegalArgumentException,String] = Invalid(java.lang.IllegalArgumentException: Must not be empty)\r\n```"},"comment":{"url":"https://api.github.com/repos/typelevel/cats/issues/comments/210857234","html_url":"https://github.com/typelevel/cats/pull/984#issuecomment-210857234","issue_url":"https://api.github.com/repos/typelevel/cats/issues/984","id":210857234,"user":{"login":"markus1189","id":591567,"avatar_url":"https://avatars.githubusercontent.com/u/591567?v=3","gravatar_id":"","url":"https://api.github.com/users/markus1189","html_url":"https://github.com/markus1189","followers_url":"https://api.github.com/users/markus1189/followers","following_url":"https://api.github.com/users/markus1189/following{/other_user}","gists_url":"https://api.github.com/users/markus1189/gists{/gist_id}","starred_url":"https://api.github.com/users/markus1189/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus1189/subscriptions","organizations_url":"https://api.github.com/users/markus1189/orgs","repos_url":"https://api.github.com/users/markus1189/repos","events_url":"https://api.github.com/users/markus1189/events{/privacy}","received_events_url":"https://api.github.com/users/markus1189/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T16:55:10Z","updated_at":"2016-04-16T16:55:10Z","body":"I like your suggestion using `exists` better ;)"}}