{"action":"created","comment":{"url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/comments/64205769","id":64205769,"diff_hunk":"@@ -1,11 +1,49 @@\n package io.scalac.wtf.domain\n \n+import cats.data.Validated.{invalidNel, valid}\n+import cats.data.{NonEmptyList, ValidatedNel}\n+import cats.implicits._\n import slick.lifted.MappedTo\n \n+import scala.util.matching.Regex\n \n case class UserId(value: Long) extends MappedTo[Long]\n \n case class User(\n     id: Option[UserId] = None,\n     email: String, \n     password: String)\n+\n+object User {\n+\n+  sealed trait ValidationError\n+  final case object WrongEmailPattern extends ValidationError\n+  final case object EmptyPassword     extends ValidationError\n+\n+  def validateUser(email: String, password: String): ValidatedNel[ValidationError, User] = {\n+    val validation = (validateEmail(email) |@| validatePassword(password))","path":"src/main/scala/io/scalac/wtf/domain/User.scala","position":24,"original_position":24,"commit_id":"fbd87f49204e5453a26f62861ee868124957d456","original_commit_id":"fbd87f49204e5453a26f62861ee868124957d456","user":{"login":"margorczynski","id":1714491,"avatar_url":"https://avatars.githubusercontent.com/u/1714491?v=3","gravatar_id":"","url":"https://api.github.com/users/margorczynski","html_url":"https://github.com/margorczynski","followers_url":"https://api.github.com/users/margorczynski/followers","following_url":"https://api.github.com/users/margorczynski/following{/other_user}","gists_url":"https://api.github.com/users/margorczynski/gists{/gist_id}","starred_url":"https://api.github.com/users/margorczynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/margorczynski/subscriptions","organizations_url":"https://api.github.com/users/margorczynski/orgs","repos_url":"https://api.github.com/users/margorczynski/repos","events_url":"https://api.github.com/users/margorczynski/events{/privacy}","received_events_url":"https://api.github.com/users/margorczynski/received_events","type":"User","site_admin":false},"body":"I also don't understand, please explain","created_at":"2016-05-23T11:17:05Z","updated_at":"2016-05-23T11:17:05Z","html_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot/pull/1#discussion_r64205769","pull_request_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/comments/64205769"},"html":{"href":"https://github.com/ScalaConsultants/whisky-tango-foxtrot/pull/1#discussion_r64205769"},"pull_request":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1","id":70368353,"html_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot/pull/1","diff_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot/pull/1.diff","patch_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot/pull/1.patch","issue_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/1","number":1,"state":"open","locked":false,"title":"User validation","user":{"login":"margorczynski","id":1714491,"avatar_url":"https://avatars.githubusercontent.com/u/1714491?v=3","gravatar_id":"","url":"https://api.github.com/users/margorczynski","html_url":"https://github.com/margorczynski","followers_url":"https://api.github.com/users/margorczynski/followers","following_url":"https://api.github.com/users/margorczynski/following{/other_user}","gists_url":"https://api.github.com/users/margorczynski/gists{/gist_id}","starred_url":"https://api.github.com/users/margorczynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/margorczynski/subscriptions","organizations_url":"https://api.github.com/users/margorczynski/orgs","repos_url":"https://api.github.com/users/margorczynski/repos","events_url":"https://api.github.com/users/margorczynski/events{/privacy}","received_events_url":"https://api.github.com/users/margorczynski/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-17T14:36:39Z","updated_at":"2016-05-23T11:17:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5066fb475ffd91c61b2e62baea571308a497b5d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/1/comments","statuses_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/statuses/fbd87f49204e5453a26f62861ee868124957d456","head":{"label":"ScalaConsultants:user_validation","ref":"user_validation","sha":"fbd87f49204e5453a26f62861ee868124957d456","user":{"login":"ScalaConsultants","id":6207831,"avatar_url":"https://avatars.githubusercontent.com/u/6207831?v=3","gravatar_id":"","url":"https://api.github.com/users/ScalaConsultants","html_url":"https://github.com/ScalaConsultants","followers_url":"https://api.github.com/users/ScalaConsultants/followers","following_url":"https://api.github.com/users/ScalaConsultants/following{/other_user}","gists_url":"https://api.github.com/users/ScalaConsultants/gists{/gist_id}","starred_url":"https://api.github.com/users/ScalaConsultants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScalaConsultants/subscriptions","organizations_url":"https://api.github.com/users/ScalaConsultants/orgs","repos_url":"https://api.github.com/users/ScalaConsultants/repos","events_url":"https://api.github.com/users/ScalaConsultants/events{/privacy}","received_events_url":"https://api.github.com/users/ScalaConsultants/received_events","type":"Organization","site_admin":false},"repo":{"id":57599829,"name":"whisky-tango-foxtrot","full_name":"ScalaConsultants/whisky-tango-foxtrot","owner":{"login":"ScalaConsultants","id":6207831,"avatar_url":"https://avatars.githubusercontent.com/u/6207831?v=3","gravatar_id":"","url":"https://api.github.com/users/ScalaConsultants","html_url":"https://github.com/ScalaConsultants","followers_url":"https://api.github.com/users/ScalaConsultants/followers","following_url":"https://api.github.com/users/ScalaConsultants/following{/other_user}","gists_url":"https://api.github.com/users/ScalaConsultants/gists{/gist_id}","starred_url":"https://api.github.com/users/ScalaConsultants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScalaConsultants/subscriptions","organizations_url":"https://api.github.com/users/ScalaConsultants/orgs","repos_url":"https://api.github.com/users/ScalaConsultants/repos","events_url":"https://api.github.com/users/ScalaConsultants/events{/privacy}","received_events_url":"https://api.github.com/users/ScalaConsultants/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot","description":"","fork":false,"url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot","forks_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/forks","keys_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/teams","hooks_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/hooks","issue_events_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/events{/number}","events_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/events","assignees_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/assignees{/user}","branches_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/branches{/branch}","tags_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/tags","blobs_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/statuses/{sha}","languages_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/languages","stargazers_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/stargazers","contributors_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/contributors","subscribers_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/subscribers","subscription_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/subscription","commits_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/contents/{+path}","compare_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/merges","archive_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/downloads","issues_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues{/number}","pulls_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls{/number}","milestones_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/milestones{/number}","notifications_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/labels{/name}","releases_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/releases{/id}","deployments_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/deployments","created_at":"2016-05-01T13:38:40Z","updated_at":"2016-05-16T09:50:04Z","pushed_at":"2016-05-20T11:23:17Z","git_url":"git://github.com/ScalaConsultants/whisky-tango-foxtrot.git","ssh_url":"git@github.com:ScalaConsultants/whisky-tango-foxtrot.git","clone_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot.git","svn_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot","homepage":null,"size":11,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ScalaConsultants:master","ref":"master","sha":"7d096a44f13b1da87513054c51f8ee91582a21a8","user":{"login":"ScalaConsultants","id":6207831,"avatar_url":"https://avatars.githubusercontent.com/u/6207831?v=3","gravatar_id":"","url":"https://api.github.com/users/ScalaConsultants","html_url":"https://github.com/ScalaConsultants","followers_url":"https://api.github.com/users/ScalaConsultants/followers","following_url":"https://api.github.com/users/ScalaConsultants/following{/other_user}","gists_url":"https://api.github.com/users/ScalaConsultants/gists{/gist_id}","starred_url":"https://api.github.com/users/ScalaConsultants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScalaConsultants/subscriptions","organizations_url":"https://api.github.com/users/ScalaConsultants/orgs","repos_url":"https://api.github.com/users/ScalaConsultants/repos","events_url":"https://api.github.com/users/ScalaConsultants/events{/privacy}","received_events_url":"https://api.github.com/users/ScalaConsultants/received_events","type":"Organization","site_admin":false},"repo":{"id":57599829,"name":"whisky-tango-foxtrot","full_name":"ScalaConsultants/whisky-tango-foxtrot","owner":{"login":"ScalaConsultants","id":6207831,"avatar_url":"https://avatars.githubusercontent.com/u/6207831?v=3","gravatar_id":"","url":"https://api.github.com/users/ScalaConsultants","html_url":"https://github.com/ScalaConsultants","followers_url":"https://api.github.com/users/ScalaConsultants/followers","following_url":"https://api.github.com/users/ScalaConsultants/following{/other_user}","gists_url":"https://api.github.com/users/ScalaConsultants/gists{/gist_id}","starred_url":"https://api.github.com/users/ScalaConsultants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScalaConsultants/subscriptions","organizations_url":"https://api.github.com/users/ScalaConsultants/orgs","repos_url":"https://api.github.com/users/ScalaConsultants/repos","events_url":"https://api.github.com/users/ScalaConsultants/events{/privacy}","received_events_url":"https://api.github.com/users/ScalaConsultants/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot","description":"","fork":false,"url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot","forks_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/forks","keys_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/teams","hooks_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/hooks","issue_events_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/events{/number}","events_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/events","assignees_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/assignees{/user}","branches_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/branches{/branch}","tags_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/tags","blobs_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/statuses/{sha}","languages_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/languages","stargazers_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/stargazers","contributors_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/contributors","subscribers_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/subscribers","subscription_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/subscription","commits_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/contents/{+path}","compare_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/merges","archive_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/downloads","issues_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues{/number}","pulls_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls{/number}","milestones_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/milestones{/number}","notifications_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/labels{/name}","releases_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/releases{/id}","deployments_url":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/deployments","created_at":"2016-05-01T13:38:40Z","updated_at":"2016-05-16T09:50:04Z","pushed_at":"2016-05-20T11:23:17Z","git_url":"git://github.com/ScalaConsultants/whisky-tango-foxtrot.git","ssh_url":"git@github.com:ScalaConsultants/whisky-tango-foxtrot.git","clone_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot.git","svn_url":"https://github.com/ScalaConsultants/whisky-tango-foxtrot","homepage":null,"size":11,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1"},"html":{"href":"https://github.com/ScalaConsultants/whisky-tango-foxtrot/pull/1"},"issue":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/1"},"comments":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ScalaConsultants/whisky-tango-foxtrot/statuses/fbd87f49204e5453a26f62861ee868124957d456"}}}}
{"actor":{"display_login":"margorczynski"}}