{"action":"created","issue":{"url":"https://api.github.com/repos/codefordc/districthousing/issues/169","labels_url":"https://api.github.com/repos/codefordc/districthousing/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/codefordc/districthousing/issues/169/comments","events_url":"https://api.github.com/repos/codefordc/districthousing/issues/169/events","html_url":"https://github.com/codefordc/districthousing/issues/169","id":51630642,"number":169,"title":"Controls for fields involving numbers? And other \"standard\" fields?","user":{"login":"sarahfathallah","id":2940697,"avatar_url":"https://avatars.githubusercontent.com/u/2940697?v=3","gravatar_id":"","url":"https://api.github.com/users/sarahfathallah","html_url":"https://github.com/sarahfathallah","followers_url":"https://api.github.com/users/sarahfathallah/followers","following_url":"https://api.github.com/users/sarahfathallah/following{/other_user}","gists_url":"https://api.github.com/users/sarahfathallah/gists{/gist_id}","starred_url":"https://api.github.com/users/sarahfathallah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sarahfathallah/subscriptions","organizations_url":"https://api.github.com/users/sarahfathallah/orgs","repos_url":"https://api.github.com/users/sarahfathallah/repos","events_url":"https://api.github.com/users/sarahfathallah/events{/privacy}","received_events_url":"https://api.github.com/users/sarahfathallah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-12-11T00:31:36Z","updated_at":"2015-01-23T05:18:34Z","closed_at":null,"body":"This is more of a nice to have, but to avoid data entry errors, is it possible to control the content in the fields involving numbers? e.g.:\r\n\r\n- Phone numbers should have 10 digits\r\n- Similar idea for SSN, driver license numbers, zip codes, etc.\r\n\r\nSame goes for fields like e-mail addresses (check if format is correct), maybe others."},"comment":{"url":"https://api.github.com/repos/codefordc/districthousing/issues/comments/71149041","html_url":"https://github.com/codefordc/districthousing/issues/169#issuecomment-71149041","issue_url":"https://api.github.com/repos/codefordc/districthousing/issues/169","id":71149041,"user":{"login":"jrunningen","id":1123795,"avatar_url":"https://avatars.githubusercontent.com/u/1123795?v=3","gravatar_id":"","url":"https://api.github.com/users/jrunningen","html_url":"https://github.com/jrunningen","followers_url":"https://api.github.com/users/jrunningen/followers","following_url":"https://api.github.com/users/jrunningen/following{/other_user}","gists_url":"https://api.github.com/users/jrunningen/gists{/gist_id}","starred_url":"https://api.github.com/users/jrunningen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrunningen/subscriptions","organizations_url":"https://api.github.com/users/jrunningen/orgs","repos_url":"https://api.github.com/users/jrunningen/repos","events_url":"https://api.github.com/users/jrunningen/events{/privacy}","received_events_url":"https://api.github.com/users/jrunningen/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T05:18:34Z","updated_at":"2015-01-23T05:18:34Z","body":"I'm cautious about field validation because it's easy to make it too restrictive.  For example, \r\n* Foreign phone numbers might have more than 10 digits.\r\n* Driver's license number formats are different for every state.\r\n* Email can *mostly* be validated with the following regular expression, but it's ridiculous: \r\n```\r\n[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?`\r\n```\r\nAnd since the data is just being pasted verbatim into some PDFs, and not, say, used to send automated e-mails or make phone calls, it seems safer to me to just accept whatever the user wants to give us, for the most part."}}