{"action":"created","issue":{"url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/issues/34","labels_url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/issues/34/comments","events_url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/issues/34/events","html_url":"https://github.com/courageous-trapeze/courageous-trapeze/pull/34","id":74802612,"number":34,"title":"Fix convertPhone()","user":{"login":"kevhuang","id":3806348,"avatar_url":"https://avatars.githubusercontent.com/u/3806348?v=3","gravatar_id":"","url":"https://api.github.com/users/kevhuang","html_url":"https://github.com/kevhuang","followers_url":"https://api.github.com/users/kevhuang/followers","following_url":"https://api.github.com/users/kevhuang/following{/other_user}","gists_url":"https://api.github.com/users/kevhuang/gists{/gist_id}","starred_url":"https://api.github.com/users/kevhuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevhuang/subscriptions","organizations_url":"https://api.github.com/users/kevhuang/orgs","repos_url":"https://api.github.com/users/kevhuang/repos","events_url":"https://api.github.com/users/kevhuang/events{/privacy}","received_events_url":"https://api.github.com/users/kevhuang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-10T01:34:18Z","updated_at":"2015-05-10T01:58:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/pulls/34","html_url":"https://github.com/courageous-trapeze/courageous-trapeze/pull/34","diff_url":"https://github.com/courageous-trapeze/courageous-trapeze/pull/34.diff","patch_url":"https://github.com/courageous-trapeze/courageous-trapeze/pull/34.patch"},"body":"For some reason, the previous implementation didn't work, so I re-wrote it using a regular expression.\r\n\r\nBefore, when I tried to add contacts with non-numeric characters in their phone numbers, it would produce the following error in Node:\r\n\r\n```\r\n{ [ValidationError: Contact validation failed]\r\n  message: 'Contact validation failed',\r\n  name: 'ValidationError',\r\n  errors: \r\n   { phone: \r\n      { [CastError: Cast to Number failed for value \"NaN\" at path \"phone\"]\r\n        message: 'Cast to Number failed for value \"NaN\" at path \"phone\"',\r\n        name: 'CastError',\r\n        kind: 'Number',\r\n        value: NaN,\r\n        path: 'phone' } } }\r\n```"},"comment":{"url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/issues/comments/100572120","html_url":"https://github.com/courageous-trapeze/courageous-trapeze/pull/34#issuecomment-100572120","issue_url":"https://api.github.com/repos/courageous-trapeze/courageous-trapeze/issues/34","id":100572120,"user":{"login":"jyeg","id":1071914,"avatar_url":"https://avatars.githubusercontent.com/u/1071914?v=3","gravatar_id":"","url":"https://api.github.com/users/jyeg","html_url":"https://github.com/jyeg","followers_url":"https://api.github.com/users/jyeg/followers","following_url":"https://api.github.com/users/jyeg/following{/other_user}","gists_url":"https://api.github.com/users/jyeg/gists{/gist_id}","starred_url":"https://api.github.com/users/jyeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyeg/subscriptions","organizations_url":"https://api.github.com/users/jyeg/orgs","repos_url":"https://api.github.com/users/jyeg/repos","events_url":"https://api.github.com/users/jyeg/events{/privacy}","received_events_url":"https://api.github.com/users/jyeg/received_events","type":"User","site_admin":false},"created_at":"2015-05-10T01:58:00Z","updated_at":"2015-05-10T01:58:00Z","body":"yes!"}}