{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/iron-form/issues/140","repository_url":"https://api.github.com/repos/PolymerElements/iron-form","labels_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/140/comments","events_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/140/events","html_url":"https://github.com/PolymerElements/iron-form/pull/140","id":164663262,"number":140,"title":"Run custom validation on fields that are not required too","user":{"login":"mercmobily","id":2128734,"avatar_url":"https://avatars.githubusercontent.com/u/2128734?v=3","gravatar_id":"","url":"https://api.github.com/users/mercmobily","html_url":"https://github.com/mercmobily","followers_url":"https://api.github.com/users/mercmobily/followers","following_url":"https://api.github.com/users/mercmobily/following{/other_user}","gists_url":"https://api.github.com/users/mercmobily/gists{/gist_id}","starred_url":"https://api.github.com/users/mercmobily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mercmobily/subscriptions","organizations_url":"https://api.github.com/users/mercmobily/orgs","repos_url":"https://api.github.com/users/mercmobily/repos","events_url":"https://api.github.com/users/mercmobily/events{/privacy}","received_events_url":"https://api.github.com/users/mercmobily/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PolymerElements/iron-form/labels/cla:%20yes","name":"cla: yes","color":"00ff00"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-09T11:32:00Z","updated_at":"2016-07-11T00:45:17Z","closed_at":"2016-07-10T20:15:15Z","pull_request":{"url":"https://api.github.com/repos/PolymerElements/iron-form/pulls/140","html_url":"https://github.com/PolymerElements/iron-form/pull/140","diff_url":"https://github.com/PolymerElements/iron-form/pull/140.diff","patch_url":"https://github.com/PolymerElements/iron-form/pull/140.patch"},"body":"Custom elements should be validated even though they are not required.\r\nThe original report #95 was mistakenly seen as a duplicate of #48 (which wasn't).\r\nThe explanation give was:\r\n\r\n> Unfortunately, that's not how native forms work (http://jsbin.com/benome/edit?html,output). Only required elements are validated by the form, regardless of their name attribute.\r\n\r\nHowever, this explanation works in terms of native check that only applies to regexp, ranges, types, etc. -- it cannot possibly apply to _custom_ validator functions on _custon_ elements.\r\n\r\nNote that without this PR, it's impossible to implement an \"optional email address\" or \"optional phone number\".\r\nThe workaround suggested:\r\n\r\n> If you want to do validation on your element but _not_ require it in the form I think you have to do this manually with the element itself. For example, in paper-input, you could add the auto-validate and pattern attributes (and then the input will tell you when you're not entering the right thing), but the form won't care.\r\n\r\nIs not really a solution. I cannot think of a scenario where the current behaviour makes sense, especially since it imposes a limitation that renders common use cases really difficult and kludgy.\r\n"},"comment":{"url":"https://api.github.com/repos/PolymerElements/iron-form/issues/comments/231621099","html_url":"https://github.com/PolymerElements/iron-form/pull/140#issuecomment-231621099","issue_url":"https://api.github.com/repos/PolymerElements/iron-form/issues/140","id":231621099,"user":{"login":"mercmobily","id":2128734,"avatar_url":"https://avatars.githubusercontent.com/u/2128734?v=3","gravatar_id":"","url":"https://api.github.com/users/mercmobily","html_url":"https://github.com/mercmobily","followers_url":"https://api.github.com/users/mercmobily/followers","following_url":"https://api.github.com/users/mercmobily/following{/other_user}","gists_url":"https://api.github.com/users/mercmobily/gists{/gist_id}","starred_url":"https://api.github.com/users/mercmobily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mercmobily/subscriptions","organizations_url":"https://api.github.com/users/mercmobily/orgs","repos_url":"https://api.github.com/users/mercmobily/repos","events_url":"https://api.github.com/users/mercmobily/events{/privacy}","received_events_url":"https://api.github.com/users/mercmobily/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T00:45:17Z","updated_at":"2016-07-11T00:45:17Z","body":"Totally missed, sorry! When will Polymer 1.7 be released? (Including this fix, I assume)\r\nThanks!"}}
{"actor":{"display_login":"mercmobily"}}