{"action":"created","comment":{"url":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/comments/82391836","pull_request_review_id":3302935,"id":82391836,"diff_hunk":"@@ -55,6 +68,17 @@ describe('Phone', () => {\n     }\n   });\n \n+  it('should throw an error if the phone does not have one of the given allowed types', () => {\n+    try {\n+      new Assert().Phone({ allowedTypes: ['FIXED_LINE', 'MOBILE'] }).validate('+1 415 555 2671');\n+\n+      should.fail();\n+    } catch (e) {\n+      e.should.be.instanceOf(Violation);\n+      e.show().assert.should.equal('Phone');\n+    }\n+  });\n+\n   it('should accept a valid phone in the e164 format', () => {","path":"test/asserts/phone-assert_test.js","position":35,"original_position":35,"commit_id":"f757322ec6721b1b552798cfb99380210e318267","original_commit_id":"f757322ec6721b1b552798cfb99380210e318267","user":{"login":"ruimarinho","id":288709,"avatar_url":"https://avatars.githubusercontent.com/u/288709?v=3","gravatar_id":"","url":"https://api.github.com/users/ruimarinho","html_url":"https://github.com/ruimarinho","followers_url":"https://api.github.com/users/ruimarinho/followers","following_url":"https://api.github.com/users/ruimarinho/following{/other_user}","gists_url":"https://api.github.com/users/ruimarinho/gists{/gist_id}","starred_url":"https://api.github.com/users/ruimarinho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruimarinho/subscriptions","organizations_url":"https://api.github.com/users/ruimarinho/orgs","repos_url":"https://api.github.com/users/ruimarinho/repos","events_url":"https://api.github.com/users/ruimarinho/events{/privacy}","received_events_url":"https://api.github.com/users/ruimarinho/received_events","type":"User","site_admin":false},"body":"Missing test where a number belonging to an allowed type is accepted.","created_at":"2016-10-07T13:47:23Z","updated_at":"2016-10-07T13:48:03Z","html_url":"https://github.com/seegno/validator.js-asserts/pull/151#discussion_r82391836","pull_request_url":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151","_links":{"self":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/comments/82391836"},"html":{"href":"https://github.com/seegno/validator.js-asserts/pull/151#discussion_r82391836"},"pull_request":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151"}}},"pull_request":{"url":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151","id":84500590,"html_url":"https://github.com/seegno/validator.js-asserts/pull/151","diff_url":"https://github.com/seegno/validator.js-asserts/pull/151.diff","patch_url":"https://github.com/seegno/validator.js-asserts/pull/151.patch","issue_url":"https://api.github.com/repos/seegno/validator.js-asserts/issues/151","number":151,"state":"open","locked":false,"title":"Support allowing specific phone types","user":{"login":"kurayama","id":257346,"avatar_url":"https://avatars.githubusercontent.com/u/257346?v=3","gravatar_id":"","url":"https://api.github.com/users/kurayama","html_url":"https://github.com/kurayama","followers_url":"https://api.github.com/users/kurayama/followers","following_url":"https://api.github.com/users/kurayama/following{/other_user}","gists_url":"https://api.github.com/users/kurayama/gists{/gist_id}","starred_url":"https://api.github.com/users/kurayama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurayama/subscriptions","organizations_url":"https://api.github.com/users/kurayama/orgs","repos_url":"https://api.github.com/users/kurayama/repos","events_url":"https://api.github.com/users/kurayama/events{/privacy}","received_events_url":"https://api.github.com/users/kurayama/received_events","type":"User","site_admin":false},"body":"This PR adds the ability to specify the phones types allowed in the `Phone` assert.\r\nWith this we can, for example, only allow land line and mobile phones (avoid premium numbers).","created_at":"2016-09-08T15:31:03Z","updated_at":"2016-10-07T13:48:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd7e12ef9c51c56bd6e4cf276d0d14e1bcd8c175","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151/commits","review_comments_url":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151/comments","review_comment_url":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seegno/validator.js-asserts/issues/151/comments","statuses_url":"https://api.github.com/repos/seegno/validator.js-asserts/statuses/f757322ec6721b1b552798cfb99380210e318267","head":{"label":"kurayama:feature/phone-type","ref":"feature/phone-type","sha":"f757322ec6721b1b552798cfb99380210e318267","user":{"login":"kurayama","id":257346,"avatar_url":"https://avatars.githubusercontent.com/u/257346?v=3","gravatar_id":"","url":"https://api.github.com/users/kurayama","html_url":"https://github.com/kurayama","followers_url":"https://api.github.com/users/kurayama/followers","following_url":"https://api.github.com/users/kurayama/following{/other_user}","gists_url":"https://api.github.com/users/kurayama/gists{/gist_id}","starred_url":"https://api.github.com/users/kurayama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurayama/subscriptions","organizations_url":"https://api.github.com/users/kurayama/orgs","repos_url":"https://api.github.com/users/kurayama/repos","events_url":"https://api.github.com/users/kurayama/events{/privacy}","received_events_url":"https://api.github.com/users/kurayama/received_events","type":"User","site_admin":false},"repo":{"id":67710866,"name":"validator.js-asserts","full_name":"kurayama/validator.js-asserts","owner":{"login":"kurayama","id":257346,"avatar_url":"https://avatars.githubusercontent.com/u/257346?v=3","gravatar_id":"","url":"https://api.github.com/users/kurayama","html_url":"https://github.com/kurayama","followers_url":"https://api.github.com/users/kurayama/followers","following_url":"https://api.github.com/users/kurayama/following{/other_user}","gists_url":"https://api.github.com/users/kurayama/gists{/gist_id}","starred_url":"https://api.github.com/users/kurayama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurayama/subscriptions","organizations_url":"https://api.github.com/users/kurayama/orgs","repos_url":"https://api.github.com/users/kurayama/repos","events_url":"https://api.github.com/users/kurayama/events{/privacy}","received_events_url":"https://api.github.com/users/kurayama/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kurayama/validator.js-asserts","description":"A set of extra asserts for validator.js.","fork":true,"url":"https://api.github.com/repos/kurayama/validator.js-asserts","forks_url":"https://api.github.com/repos/kurayama/validator.js-asserts/forks","keys_url":"https://api.github.com/repos/kurayama/validator.js-asserts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kurayama/validator.js-asserts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kurayama/validator.js-asserts/teams","hooks_url":"https://api.github.com/repos/kurayama/validator.js-asserts/hooks","issue_events_url":"https://api.github.com/repos/kurayama/validator.js-asserts/issues/events{/number}","events_url":"https://api.github.com/repos/kurayama/validator.js-asserts/events","assignees_url":"https://api.github.com/repos/kurayama/validator.js-asserts/assignees{/user}","branches_url":"https://api.github.com/repos/kurayama/validator.js-asserts/branches{/branch}","tags_url":"https://api.github.com/repos/kurayama/validator.js-asserts/tags","blobs_url":"https://api.github.com/repos/kurayama/validator.js-asserts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kurayama/validator.js-asserts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kurayama/validator.js-asserts/git/refs{/sha}","trees_url":"https://api.github.com/repos/kurayama/validator.js-asserts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kurayama/validator.js-asserts/statuses/{sha}","languages_url":"https://api.github.com/repos/kurayama/validator.js-asserts/languages","stargazers_url":"https://api.github.com/repos/kurayama/validator.js-asserts/stargazers","contributors_url":"https://api.github.com/repos/kurayama/validator.js-asserts/contributors","subscribers_url":"https://api.github.com/repos/kurayama/validator.js-asserts/subscribers","subscription_url":"https://api.github.com/repos/kurayama/validator.js-asserts/subscription","commits_url":"https://api.github.com/repos/kurayama/validator.js-asserts/commits{/sha}","git_commits_url":"https://api.github.com/repos/kurayama/validator.js-asserts/git/commits{/sha}","comments_url":"https://api.github.com/repos/kurayama/validator.js-asserts/comments{/number}","issue_comment_url":"https://api.github.com/repos/kurayama/validator.js-asserts/issues/comments{/number}","contents_url":"https://api.github.com/repos/kurayama/validator.js-asserts/contents/{+path}","compare_url":"https://api.github.com/repos/kurayama/validator.js-asserts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kurayama/validator.js-asserts/merges","archive_url":"https://api.github.com/repos/kurayama/validator.js-asserts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kurayama/validator.js-asserts/downloads","issues_url":"https://api.github.com/repos/kurayama/validator.js-asserts/issues{/number}","pulls_url":"https://api.github.com/repos/kurayama/validator.js-asserts/pulls{/number}","milestones_url":"https://api.github.com/repos/kurayama/validator.js-asserts/milestones{/number}","notifications_url":"https://api.github.com/repos/kurayama/validator.js-asserts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kurayama/validator.js-asserts/labels{/name}","releases_url":"https://api.github.com/repos/kurayama/validator.js-asserts/releases{/id}","deployments_url":"https://api.github.com/repos/kurayama/validator.js-asserts/deployments","created_at":"2016-09-08T14:33:23Z","updated_at":"2016-09-08T14:33:25Z","pushed_at":"2016-09-08T15:27:10Z","git_url":"git://github.com/kurayama/validator.js-asserts.git","ssh_url":"git@github.com:kurayama/validator.js-asserts.git","clone_url":"https://github.com/kurayama/validator.js-asserts.git","svn_url":"https://github.com/kurayama/validator.js-asserts","homepage":"http://seegno.github.io/validator.js-asserts/","size":214,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"seegno:master","ref":"master","sha":"b8083b6c28a2971d8f109e4c91e0dba117e9e5b9","user":{"login":"seegno","id":1326469,"avatar_url":"https://avatars.githubusercontent.com/u/1326469?v=3","gravatar_id":"","url":"https://api.github.com/users/seegno","html_url":"https://github.com/seegno","followers_url":"https://api.github.com/users/seegno/followers","following_url":"https://api.github.com/users/seegno/following{/other_user}","gists_url":"https://api.github.com/users/seegno/gists{/gist_id}","starred_url":"https://api.github.com/users/seegno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seegno/subscriptions","organizations_url":"https://api.github.com/users/seegno/orgs","repos_url":"https://api.github.com/users/seegno/repos","events_url":"https://api.github.com/users/seegno/events{/privacy}","received_events_url":"https://api.github.com/users/seegno/received_events","type":"Organization","site_admin":false},"repo":{"id":26413671,"name":"validator.js-asserts","full_name":"seegno/validator.js-asserts","owner":{"login":"seegno","id":1326469,"avatar_url":"https://avatars.githubusercontent.com/u/1326469?v=3","gravatar_id":"","url":"https://api.github.com/users/seegno","html_url":"https://github.com/seegno","followers_url":"https://api.github.com/users/seegno/followers","following_url":"https://api.github.com/users/seegno/following{/other_user}","gists_url":"https://api.github.com/users/seegno/gists{/gist_id}","starred_url":"https://api.github.com/users/seegno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seegno/subscriptions","organizations_url":"https://api.github.com/users/seegno/orgs","repos_url":"https://api.github.com/users/seegno/repos","events_url":"https://api.github.com/users/seegno/events{/privacy}","received_events_url":"https://api.github.com/users/seegno/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seegno/validator.js-asserts","description":"A set of extra asserts for validator.js.","fork":false,"url":"https://api.github.com/repos/seegno/validator.js-asserts","forks_url":"https://api.github.com/repos/seegno/validator.js-asserts/forks","keys_url":"https://api.github.com/repos/seegno/validator.js-asserts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seegno/validator.js-asserts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seegno/validator.js-asserts/teams","hooks_url":"https://api.github.com/repos/seegno/validator.js-asserts/hooks","issue_events_url":"https://api.github.com/repos/seegno/validator.js-asserts/issues/events{/number}","events_url":"https://api.github.com/repos/seegno/validator.js-asserts/events","assignees_url":"https://api.github.com/repos/seegno/validator.js-asserts/assignees{/user}","branches_url":"https://api.github.com/repos/seegno/validator.js-asserts/branches{/branch}","tags_url":"https://api.github.com/repos/seegno/validator.js-asserts/tags","blobs_url":"https://api.github.com/repos/seegno/validator.js-asserts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seegno/validator.js-asserts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seegno/validator.js-asserts/git/refs{/sha}","trees_url":"https://api.github.com/repos/seegno/validator.js-asserts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seegno/validator.js-asserts/statuses/{sha}","languages_url":"https://api.github.com/repos/seegno/validator.js-asserts/languages","stargazers_url":"https://api.github.com/repos/seegno/validator.js-asserts/stargazers","contributors_url":"https://api.github.com/repos/seegno/validator.js-asserts/contributors","subscribers_url":"https://api.github.com/repos/seegno/validator.js-asserts/subscribers","subscription_url":"https://api.github.com/repos/seegno/validator.js-asserts/subscription","commits_url":"https://api.github.com/repos/seegno/validator.js-asserts/commits{/sha}","git_commits_url":"https://api.github.com/repos/seegno/validator.js-asserts/git/commits{/sha}","comments_url":"https://api.github.com/repos/seegno/validator.js-asserts/comments{/number}","issue_comment_url":"https://api.github.com/repos/seegno/validator.js-asserts/issues/comments{/number}","contents_url":"https://api.github.com/repos/seegno/validator.js-asserts/contents/{+path}","compare_url":"https://api.github.com/repos/seegno/validator.js-asserts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seegno/validator.js-asserts/merges","archive_url":"https://api.github.com/repos/seegno/validator.js-asserts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seegno/validator.js-asserts/downloads","issues_url":"https://api.github.com/repos/seegno/validator.js-asserts/issues{/number}","pulls_url":"https://api.github.com/repos/seegno/validator.js-asserts/pulls{/number}","milestones_url":"https://api.github.com/repos/seegno/validator.js-asserts/milestones{/number}","notifications_url":"https://api.github.com/repos/seegno/validator.js-asserts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seegno/validator.js-asserts/labels{/name}","releases_url":"https://api.github.com/repos/seegno/validator.js-asserts/releases{/id}","deployments_url":"https://api.github.com/repos/seegno/validator.js-asserts/deployments","created_at":"2014-11-09T23:52:37Z","updated_at":"2016-09-28T18:26:01Z","pushed_at":"2016-10-04T18:10:01Z","git_url":"git://github.com/seegno/validator.js-asserts.git","ssh_url":"git@github.com:seegno/validator.js-asserts.git","clone_url":"https://github.com/seegno/validator.js-asserts.git","svn_url":"https://github.com/seegno/validator.js-asserts","homepage":"http://seegno.github.io/validator.js-asserts/","size":273,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151"},"html":{"href":"https://github.com/seegno/validator.js-asserts/pull/151"},"issue":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/issues/151"},"comments":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/seegno/validator.js-asserts/statuses/f757322ec6721b1b552798cfb99380210e318267"}}}}
{"actor":{"display_login":"ruimarinho"}}