{"action":"created","comment":{"url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/comments/61353232","id":61353232,"diff_hunk":"@@ -11,18 +11,12 @@ def processed_value\n     private\n \n     def validate\n-      return if value_blank? ||\n-                valid_us_number_without_country_code?(processed_value) ||\n-                valid_us_number_with_country_code?(processed_value)\n+      return if value_blank? || valid_phone_number?(processed_value)\n       @error = \"#{@value} is not a valid phone number\"\n     end\n \n-    def valid_us_number_with_country_code?(number)\n-      number.start_with?('1') && valid_us_number_without_country_code?(number[1..-1])\n-    end\n-\n-    def valid_us_number_without_country_code?(number)\n-      !number.start_with?('1') && !number.start_with?('0') && number.size == 10\n+    def valid_phone_number?(number)\n+      /^[1]*[2-9][0-9]{2}[2-9][0-9]{6}$/.match(number.to_s)","path":"lib/rentlinx/validators/phone_validator.rb","position":null,"original_position":18,"commit_id":"8ed8be95766f2176946b765ebbbf933e08e47f35","original_commit_id":"b3086744374aeabaf18588e2f1ae65a151612bf0","user":{"login":"blakeherrington","id":18268801,"avatar_url":"https://avatars.githubusercontent.com/u/18268801?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeherrington","html_url":"https://github.com/blakeherrington","followers_url":"https://api.github.com/users/blakeherrington/followers","following_url":"https://api.github.com/users/blakeherrington/following{/other_user}","gists_url":"https://api.github.com/users/blakeherrington/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeherrington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeherrington/subscriptions","organizations_url":"https://api.github.com/users/blakeherrington/orgs","repos_url":"https://api.github.com/users/blakeherrington/repos","events_url":"https://api.github.com/users/blakeherrington/events{/privacy}","received_events_url":"https://api.github.com/users/blakeherrington/received_events","type":"User","site_admin":false},"body":"Made this change in 8ed8be9. Let me know if you guys think it's 👍 ","created_at":"2016-04-27T23:20:55Z","updated_at":"2016-04-27T23:20:55Z","html_url":"https://github.com/appfolio/rentlinx_client/pull/53#discussion_r61353232","pull_request_url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/comments/61353232"},"html":{"href":"https://github.com/appfolio/rentlinx_client/pull/53#discussion_r61353232"},"pull_request":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53","id":67972726,"html_url":"https://github.com/appfolio/rentlinx_client/pull/53","diff_url":"https://github.com/appfolio/rentlinx_client/pull/53.diff","patch_url":"https://github.com/appfolio/rentlinx_client/pull/53.patch","issue_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues/53","number":53,"state":"open","locked":false,"title":"Change phone number validation to match RentLinx regex [Delivers #118038889]","user":{"login":"blakeherrington","id":18268801,"avatar_url":"https://avatars.githubusercontent.com/u/18268801?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeherrington","html_url":"https://github.com/blakeherrington","followers_url":"https://api.github.com/users/blakeherrington/followers","following_url":"https://api.github.com/users/blakeherrington/following{/other_user}","gists_url":"https://api.github.com/users/blakeherrington/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeherrington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeherrington/subscriptions","organizations_url":"https://api.github.com/users/blakeherrington/orgs","repos_url":"https://api.github.com/users/blakeherrington/repos","events_url":"https://api.github.com/users/blakeherrington/events{/privacy}","received_events_url":"https://api.github.com/users/blakeherrington/received_events","type":"User","site_admin":false},"body":"Only partially delivers this story... need to make the change in user vacancy settings validation as well in apm_bundle...\r\n\r\np.s. I noticed there was no \"ace\" label for this since it's a different repo! Let me know if I'm missing anything that should normally be included in a PR.","created_at":"2016-04-26T23:08:30Z","updated_at":"2016-04-27T23:20:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6393e966ac597f239e0f997b2eb5643839a824c0","assignee":{"login":"XanderStrike","id":1565303,"avatar_url":"https://avatars.githubusercontent.com/u/1565303?v=3","gravatar_id":"","url":"https://api.github.com/users/XanderStrike","html_url":"https://github.com/XanderStrike","followers_url":"https://api.github.com/users/XanderStrike/followers","following_url":"https://api.github.com/users/XanderStrike/following{/other_user}","gists_url":"https://api.github.com/users/XanderStrike/gists{/gist_id}","starred_url":"https://api.github.com/users/XanderStrike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XanderStrike/subscriptions","organizations_url":"https://api.github.com/users/XanderStrike/orgs","repos_url":"https://api.github.com/users/XanderStrike/repos","events_url":"https://api.github.com/users/XanderStrike/events{/privacy}","received_events_url":"https://api.github.com/users/XanderStrike/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53/commits","review_comments_url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53/comments","review_comment_url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues/53/comments","statuses_url":"https://api.github.com/repos/appfolio/rentlinx_client/statuses/8ed8be95766f2176946b765ebbbf933e08e47f35","head":{"label":"appfolio:AceMatchRentLinxPhoneNumberValidation","ref":"AceMatchRentLinxPhoneNumberValidation","sha":"8ed8be95766f2176946b765ebbbf933e08e47f35","user":{"login":"appfolio","id":115119,"avatar_url":"https://avatars.githubusercontent.com/u/115119?v=3","gravatar_id":"","url":"https://api.github.com/users/appfolio","html_url":"https://github.com/appfolio","followers_url":"https://api.github.com/users/appfolio/followers","following_url":"https://api.github.com/users/appfolio/following{/other_user}","gists_url":"https://api.github.com/users/appfolio/gists{/gist_id}","starred_url":"https://api.github.com/users/appfolio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appfolio/subscriptions","organizations_url":"https://api.github.com/users/appfolio/orgs","repos_url":"https://api.github.com/users/appfolio/repos","events_url":"https://api.github.com/users/appfolio/events{/privacy}","received_events_url":"https://api.github.com/users/appfolio/received_events","type":"Organization","site_admin":false},"repo":{"id":36883599,"name":"rentlinx_client","full_name":"appfolio/rentlinx_client","owner":{"login":"appfolio","id":115119,"avatar_url":"https://avatars.githubusercontent.com/u/115119?v=3","gravatar_id":"","url":"https://api.github.com/users/appfolio","html_url":"https://github.com/appfolio","followers_url":"https://api.github.com/users/appfolio/followers","following_url":"https://api.github.com/users/appfolio/following{/other_user}","gists_url":"https://api.github.com/users/appfolio/gists{/gist_id}","starred_url":"https://api.github.com/users/appfolio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appfolio/subscriptions","organizations_url":"https://api.github.com/users/appfolio/orgs","repos_url":"https://api.github.com/users/appfolio/repos","events_url":"https://api.github.com/users/appfolio/events{/privacy}","received_events_url":"https://api.github.com/users/appfolio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appfolio/rentlinx_client","description":"A ruby wrapper for the RentLinx API.","fork":false,"url":"https://api.github.com/repos/appfolio/rentlinx_client","forks_url":"https://api.github.com/repos/appfolio/rentlinx_client/forks","keys_url":"https://api.github.com/repos/appfolio/rentlinx_client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appfolio/rentlinx_client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appfolio/rentlinx_client/teams","hooks_url":"https://api.github.com/repos/appfolio/rentlinx_client/hooks","issue_events_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues/events{/number}","events_url":"https://api.github.com/repos/appfolio/rentlinx_client/events","assignees_url":"https://api.github.com/repos/appfolio/rentlinx_client/assignees{/user}","branches_url":"https://api.github.com/repos/appfolio/rentlinx_client/branches{/branch}","tags_url":"https://api.github.com/repos/appfolio/rentlinx_client/tags","blobs_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/refs{/sha}","trees_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appfolio/rentlinx_client/statuses/{sha}","languages_url":"https://api.github.com/repos/appfolio/rentlinx_client/languages","stargazers_url":"https://api.github.com/repos/appfolio/rentlinx_client/stargazers","contributors_url":"https://api.github.com/repos/appfolio/rentlinx_client/contributors","subscribers_url":"https://api.github.com/repos/appfolio/rentlinx_client/subscribers","subscription_url":"https://api.github.com/repos/appfolio/rentlinx_client/subscription","commits_url":"https://api.github.com/repos/appfolio/rentlinx_client/commits{/sha}","git_commits_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/commits{/sha}","comments_url":"https://api.github.com/repos/appfolio/rentlinx_client/comments{/number}","issue_comment_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues/comments{/number}","contents_url":"https://api.github.com/repos/appfolio/rentlinx_client/contents/{+path}","compare_url":"https://api.github.com/repos/appfolio/rentlinx_client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appfolio/rentlinx_client/merges","archive_url":"https://api.github.com/repos/appfolio/rentlinx_client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appfolio/rentlinx_client/downloads","issues_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues{/number}","pulls_url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls{/number}","milestones_url":"https://api.github.com/repos/appfolio/rentlinx_client/milestones{/number}","notifications_url":"https://api.github.com/repos/appfolio/rentlinx_client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appfolio/rentlinx_client/labels{/name}","releases_url":"https://api.github.com/repos/appfolio/rentlinx_client/releases{/id}","deployments_url":"https://api.github.com/repos/appfolio/rentlinx_client/deployments","created_at":"2015-06-04T16:52:02Z","updated_at":"2016-01-11T23:30:14Z","pushed_at":"2016-04-27T23:20:33Z","git_url":"git://github.com/appfolio/rentlinx_client.git","ssh_url":"git@github.com:appfolio/rentlinx_client.git","clone_url":"https://github.com/appfolio/rentlinx_client.git","svn_url":"https://github.com/appfolio/rentlinx_client","homepage":"","size":285,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"appfolio:master","ref":"master","sha":"1f2d00cf365417ead3ab2e0c65f2316a0699e357","user":{"login":"appfolio","id":115119,"avatar_url":"https://avatars.githubusercontent.com/u/115119?v=3","gravatar_id":"","url":"https://api.github.com/users/appfolio","html_url":"https://github.com/appfolio","followers_url":"https://api.github.com/users/appfolio/followers","following_url":"https://api.github.com/users/appfolio/following{/other_user}","gists_url":"https://api.github.com/users/appfolio/gists{/gist_id}","starred_url":"https://api.github.com/users/appfolio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appfolio/subscriptions","organizations_url":"https://api.github.com/users/appfolio/orgs","repos_url":"https://api.github.com/users/appfolio/repos","events_url":"https://api.github.com/users/appfolio/events{/privacy}","received_events_url":"https://api.github.com/users/appfolio/received_events","type":"Organization","site_admin":false},"repo":{"id":36883599,"name":"rentlinx_client","full_name":"appfolio/rentlinx_client","owner":{"login":"appfolio","id":115119,"avatar_url":"https://avatars.githubusercontent.com/u/115119?v=3","gravatar_id":"","url":"https://api.github.com/users/appfolio","html_url":"https://github.com/appfolio","followers_url":"https://api.github.com/users/appfolio/followers","following_url":"https://api.github.com/users/appfolio/following{/other_user}","gists_url":"https://api.github.com/users/appfolio/gists{/gist_id}","starred_url":"https://api.github.com/users/appfolio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appfolio/subscriptions","organizations_url":"https://api.github.com/users/appfolio/orgs","repos_url":"https://api.github.com/users/appfolio/repos","events_url":"https://api.github.com/users/appfolio/events{/privacy}","received_events_url":"https://api.github.com/users/appfolio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appfolio/rentlinx_client","description":"A ruby wrapper for the RentLinx API.","fork":false,"url":"https://api.github.com/repos/appfolio/rentlinx_client","forks_url":"https://api.github.com/repos/appfolio/rentlinx_client/forks","keys_url":"https://api.github.com/repos/appfolio/rentlinx_client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appfolio/rentlinx_client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appfolio/rentlinx_client/teams","hooks_url":"https://api.github.com/repos/appfolio/rentlinx_client/hooks","issue_events_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues/events{/number}","events_url":"https://api.github.com/repos/appfolio/rentlinx_client/events","assignees_url":"https://api.github.com/repos/appfolio/rentlinx_client/assignees{/user}","branches_url":"https://api.github.com/repos/appfolio/rentlinx_client/branches{/branch}","tags_url":"https://api.github.com/repos/appfolio/rentlinx_client/tags","blobs_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/refs{/sha}","trees_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appfolio/rentlinx_client/statuses/{sha}","languages_url":"https://api.github.com/repos/appfolio/rentlinx_client/languages","stargazers_url":"https://api.github.com/repos/appfolio/rentlinx_client/stargazers","contributors_url":"https://api.github.com/repos/appfolio/rentlinx_client/contributors","subscribers_url":"https://api.github.com/repos/appfolio/rentlinx_client/subscribers","subscription_url":"https://api.github.com/repos/appfolio/rentlinx_client/subscription","commits_url":"https://api.github.com/repos/appfolio/rentlinx_client/commits{/sha}","git_commits_url":"https://api.github.com/repos/appfolio/rentlinx_client/git/commits{/sha}","comments_url":"https://api.github.com/repos/appfolio/rentlinx_client/comments{/number}","issue_comment_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues/comments{/number}","contents_url":"https://api.github.com/repos/appfolio/rentlinx_client/contents/{+path}","compare_url":"https://api.github.com/repos/appfolio/rentlinx_client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appfolio/rentlinx_client/merges","archive_url":"https://api.github.com/repos/appfolio/rentlinx_client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appfolio/rentlinx_client/downloads","issues_url":"https://api.github.com/repos/appfolio/rentlinx_client/issues{/number}","pulls_url":"https://api.github.com/repos/appfolio/rentlinx_client/pulls{/number}","milestones_url":"https://api.github.com/repos/appfolio/rentlinx_client/milestones{/number}","notifications_url":"https://api.github.com/repos/appfolio/rentlinx_client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appfolio/rentlinx_client/labels{/name}","releases_url":"https://api.github.com/repos/appfolio/rentlinx_client/releases{/id}","deployments_url":"https://api.github.com/repos/appfolio/rentlinx_client/deployments","created_at":"2015-06-04T16:52:02Z","updated_at":"2016-01-11T23:30:14Z","pushed_at":"2016-04-27T23:20:33Z","git_url":"git://github.com/appfolio/rentlinx_client.git","ssh_url":"git@github.com:appfolio/rentlinx_client.git","clone_url":"https://github.com/appfolio/rentlinx_client.git","svn_url":"https://github.com/appfolio/rentlinx_client","homepage":"","size":285,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53"},"html":{"href":"https://github.com/appfolio/rentlinx_client/pull/53"},"issue":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/issues/53"},"comments":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/appfolio/rentlinx_client/statuses/8ed8be95766f2176946b765ebbbf933e08e47f35"}}}}