{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/govuk_elements/issues/249","repository_url":"https://api.github.com/repos/alphagov/govuk_elements","labels_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/249/comments","events_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/249/events","html_url":"https://github.com/alphagov/govuk_elements/issues/249","id":159114146,"number":249,"title":"Form validation patterns for Conditionally revealing content","user":{"login":"trevorsaint","id":4989027,"avatar_url":"https://avatars.githubusercontent.com/u/4989027?v=3","gravatar_id":"","url":"https://api.github.com/users/trevorsaint","html_url":"https://github.com/trevorsaint","followers_url":"https://api.github.com/users/trevorsaint/followers","following_url":"https://api.github.com/users/trevorsaint/following{/other_user}","gists_url":"https://api.github.com/users/trevorsaint/gists{/gist_id}","starred_url":"https://api.github.com/users/trevorsaint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevorsaint/subscriptions","organizations_url":"https://api.github.com/users/trevorsaint/orgs","repos_url":"https://api.github.com/users/trevorsaint/repos","events_url":"https://api.github.com/users/trevorsaint/events{/privacy}","received_events_url":"https://api.github.com/users/trevorsaint/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-06-08T09:06:30Z","updated_at":"2016-06-10T10:11:36Z","closed_at":null,"body":"I'm looking at form validation patterns.\r\n\r\nIt would be good for a collection of validation patterns which incorporate conditionally revealing content.\r\n\r\nAs an example:\r\n![ni-number-error](https://cloud.githubusercontent.com/assets/4989027/15888692/cb797328-2d5f-11e6-9e10-03edb0187f89.png)\r\n \r\nThe first validation in this case would be: Choose an answer\r\n\r\nSecondly if yes has been chosen we now have the error on the National Insurance number and not the answer.\r\n\r\n![ni-number-input-error](https://cloud.githubusercontent.com/assets/4989027/15888798/5287ed68-2d60-11e6-897d-52cc01f60746.png)\r\n\r\nIt would be interesting to see how you handle the styling aspects of this and if it has been considered.\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/alphagov/govuk_elements/issues/comments/225145511","html_url":"https://github.com/alphagov/govuk_elements/issues/249#issuecomment-225145511","issue_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/249","id":225145511,"user":{"login":"edwardhorsford","id":2204224,"avatar_url":"https://avatars.githubusercontent.com/u/2204224?v=3","gravatar_id":"","url":"https://api.github.com/users/edwardhorsford","html_url":"https://github.com/edwardhorsford","followers_url":"https://api.github.com/users/edwardhorsford/followers","following_url":"https://api.github.com/users/edwardhorsford/following{/other_user}","gists_url":"https://api.github.com/users/edwardhorsford/gists{/gist_id}","starred_url":"https://api.github.com/users/edwardhorsford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwardhorsford/subscriptions","organizations_url":"https://api.github.com/users/edwardhorsford/orgs","repos_url":"https://api.github.com/users/edwardhorsford/repos","events_url":"https://api.github.com/users/edwardhorsford/events{/privacy}","received_events_url":"https://api.github.com/users/edwardhorsford/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T10:11:36Z","updated_at":"2016-06-10T10:11:36Z","body":"In that case, the child element wouldn't have the error, since that hasn't been submitted yet?\r\n\r\nIf they then click submit without answering the child question, I'd expect the error on the child only."}}
{"actor":{"display_login":"edwardhorsford"}}