{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/gold-email-input/issues/31","labels_url":"https://api.github.com/repos/PolymerElements/gold-email-input/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/gold-email-input/issues/31/comments","events_url":"https://api.github.com/repos/PolymerElements/gold-email-input/issues/31/events","html_url":"https://github.com/PolymerElements/gold-email-input/issues/31","id":102885709,"number":31,"title":"Regex isn't right","user":{"login":"BLamy","id":324928,"avatar_url":"https://avatars.githubusercontent.com/u/324928?v=3","gravatar_id":"","url":"https://api.github.com/users/BLamy","html_url":"https://github.com/BLamy","followers_url":"https://api.github.com/users/BLamy/followers","following_url":"https://api.github.com/users/BLamy/following{/other_user}","gists_url":"https://api.github.com/users/BLamy/gists{/gist_id}","starred_url":"https://api.github.com/users/BLamy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BLamy/subscriptions","organizations_url":"https://api.github.com/users/BLamy/orgs","repos_url":"https://api.github.com/users/BLamy/repos","events_url":"https://api.github.com/users/BLamy/events{/privacy}","received_events_url":"https://api.github.com/users/BLamy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-24T20:35:38Z","updated_at":"2015-08-25T17:32:36Z","closed_at":"2015-08-24T23:28:40Z","body":"Given the current regex the following email address is considered valid\r\n`email@example`\r\n\r\nNotice the absence of a top level domain such as '.com'. I am unaware of any instances where this would be desired behavior. \r\n\r\n```\r\n^[a-zA-Z0-9.!#$%&’*+\\\\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$\r\n```\r\n\r\nShould be changed to\r\n```\r\n^[a-zA-Z0-9.!#$%&’*+\\\\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)+$\r\n```"},"comment":{"url":"https://api.github.com/repos/PolymerElements/gold-email-input/issues/comments/134679143","html_url":"https://github.com/PolymerElements/gold-email-input/issues/31#issuecomment-134679143","issue_url":"https://api.github.com/repos/PolymerElements/gold-email-input/issues/31","id":134679143,"user":{"login":"notwaldorf","id":1369170,"avatar_url":"https://avatars.githubusercontent.com/u/1369170?v=3","gravatar_id":"","url":"https://api.github.com/users/notwaldorf","html_url":"https://github.com/notwaldorf","followers_url":"https://api.github.com/users/notwaldorf/followers","following_url":"https://api.github.com/users/notwaldorf/following{/other_user}","gists_url":"https://api.github.com/users/notwaldorf/gists{/gist_id}","starred_url":"https://api.github.com/users/notwaldorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notwaldorf/subscriptions","organizations_url":"https://api.github.com/users/notwaldorf/orgs","repos_url":"https://api.github.com/users/notwaldorf/repos","events_url":"https://api.github.com/users/notwaldorf/events{/privacy}","received_events_url":"https://api.github.com/users/notwaldorf/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T17:32:36Z","updated_at":"2015-08-25T17:32:36Z","body":"The job of the W3C is exactly to spec out standards so that elements can behave predictably across the web, and we are using `<input type=email>` as a reference for how `gold-email-input` should behave.\r\n\r\nGenerally, using _any_ regex for validating email is a bad idea -- the fully compliant [regex](http://ex-parrot.com/~pdw/Mail-RFC822-Address.html) is ridiculous, and any other regex leads to conversations like this (we've also had requests to disallow single letter tlds, which the spec also allows). Any regex that we pick will have people disagreeing with it (not to mention the cost of having to maintain a custom, not universally tested regex), so the only thing that we can do to please everybody is to \r\n  1. pick something that a standards committee recommends, so that in the default case we are consistent with other elements, and \r\n  2. give the user an option to override this regex. You have this option, and you can override `gold-email-input`'s `regex` property, and use your own:\r\n```html\r\n<gold-email-input\r\n  regex=\"^[a-zA-Z0-9.!#$%&’*+\\\\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)+$\">\r\n</gold-email-input>\r\n```"}}