{"action":"opened","number":405,"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk_elements/pulls/405","id":106272393,"html_url":"https://github.com/alphagov/govuk_elements/pull/405","diff_url":"https://github.com/alphagov/govuk_elements/pull/405.diff","patch_url":"https://github.com/alphagov/govuk_elements/pull/405.patch","issue_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/405","number":405,"state":"open","locked":false,"title":"[For discussion] Breaking changes to form validation","user":{"login":"gemmaleigh","id":417754,"avatar_url":"https://avatars.githubusercontent.com/u/417754?v=3","gravatar_id":"","url":"https://api.github.com/users/gemmaleigh","html_url":"https://github.com/gemmaleigh","followers_url":"https://api.github.com/users/gemmaleigh/followers","following_url":"https://api.github.com/users/gemmaleigh/following{/other_user}","gists_url":"https://api.github.com/users/gemmaleigh/gists{/gist_id}","starred_url":"https://api.github.com/users/gemmaleigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemmaleigh/subscriptions","organizations_url":"https://api.github.com/users/gemmaleigh/orgs","repos_url":"https://api.github.com/users/gemmaleigh/repos","events_url":"https://api.github.com/users/gemmaleigh/events{/privacy}","received_events_url":"https://api.github.com/users/gemmaleigh/received_events","type":"User","site_admin":false},"body":"#### What problem does the pull request solve?\r\n\r\nThe styling for form validation is pretty fragile and relies on a parent `.error` selector to apply a red border to the left of a `.form-group` div. This class also sets a red border on any `.form-control` inputs that are direct descendents. \r\n\r\nRather than relying on a child div sitting inside a parent for this to work - add two new classes `.form-group-error` and `.form-control-error`. One will set the border for form-groups and the other for inputs/textareas with a class of form-control.\r\n\r\nThis also solves the problem where there may be multiple `.form-control` elements within a parent .error - and only one of them needs to have a red border - an example of this is the date of birth pattern.\r\n\r\n> This would be a breaking change, but at some point we'll need to make breaking changes, so let's have a discussion  about it here, rather than on Slack where it'll get lost.\r\n\r\n#### Screenshots (if appropriate):\r\n\r\nI have added the error examples to the date of birth page:\r\n\r\n![d2e321d8-1ef7-42b3-5198-6b3114ddef96](https://cloud.githubusercontent.com/assets/417754/22968224/7e14eb62-f361-11e6-8f9d-692f14dffabf.png)\r\n\r\n#### What type of change is it?\r\n<!--- What types of changes does your code introduce? Delete the lines below that don't apply. -->\r\n- Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n#### Has the documentation been updated?\r\n<!--- Delete the lines below that don't apply -->\r\n- My change requires a change to the documentation.\r\n- I have read the **CONTRIBUTING** document.\r\n","created_at":"2017-02-15T09:34:58Z","updated_at":"2017-02-15T09:34:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govuk_elements/pulls/405/commits","review_comments_url":"https://api.github.com/repos/alphagov/govuk_elements/pulls/405/comments","review_comment_url":"https://api.github.com/repos/alphagov/govuk_elements/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/405/comments","statuses_url":"https://api.github.com/repos/alphagov/govuk_elements/statuses/a0ac333492ec15d661de76235a574f11baa7307f","head":{"label":"alphagov:form-validation","ref":"form-validation","sha":"a0ac333492ec15d661de76235a574f11baa7307f","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":17901778,"name":"govuk_elements","full_name":"alphagov/govuk_elements","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk_elements","description":"GOV.UK Elements form the building blocks from which all pages are made.","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_elements","forks_url":"https://api.github.com/repos/alphagov/govuk_elements/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_elements/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_elements/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_elements/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_elements/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_elements/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_elements/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_elements/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_elements/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_elements/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_elements/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_elements/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_elements/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_elements/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_elements/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_elements/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_elements/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_elements/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_elements/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_elements/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_elements/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_elements/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_elements/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_elements/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_elements/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_elements/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_elements/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_elements/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_elements/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_elements/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_elements/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_elements/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_elements/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk_elements/deployments","created_at":"2014-03-19T11:29:16Z","updated_at":"2017-02-11T00:08:32Z","pushed_at":"2017-02-15T09:19:33Z","git_url":"git://github.com/alphagov/govuk_elements.git","ssh_url":"git@github.com:alphagov/govuk_elements.git","clone_url":"https://github.com/alphagov/govuk_elements.git","svn_url":"https://github.com/alphagov/govuk_elements","homepage":"https://govuk-elements.herokuapp.com/","size":16846,"stargazers_count":151,"watchers_count":151,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":36,"forks":63,"open_issues":36,"watchers":151,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"9af188fd7e84dae63232bcd7df2eec4b39c7ff21","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":17901778,"name":"govuk_elements","full_name":"alphagov/govuk_elements","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/govuk_elements","description":"GOV.UK Elements form the building blocks from which all pages are made.","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_elements","forks_url":"https://api.github.com/repos/alphagov/govuk_elements/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_elements/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_elements/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_elements/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_elements/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_elements/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_elements/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_elements/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_elements/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_elements/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_elements/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_elements/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_elements/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_elements/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_elements/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_elements/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_elements/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_elements/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_elements/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_elements/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_elements/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_elements/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_elements/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_elements/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_elements/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_elements/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_elements/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_elements/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_elements/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_elements/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_elements/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_elements/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_elements/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_elements/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk_elements/deployments","created_at":"2014-03-19T11:29:16Z","updated_at":"2017-02-11T00:08:32Z","pushed_at":"2017-02-15T09:19:33Z","git_url":"git://github.com/alphagov/govuk_elements.git","ssh_url":"git@github.com:alphagov/govuk_elements.git","clone_url":"https://github.com/alphagov/govuk_elements.git","svn_url":"https://github.com/alphagov/govuk_elements","homepage":"https://govuk-elements.herokuapp.com/","size":16846,"stargazers_count":151,"watchers_count":151,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":36,"forks":63,"open_issues":36,"watchers":151,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk_elements/pulls/405"},"html":{"href":"https://github.com/alphagov/govuk_elements/pull/405"},"issue":{"href":"https://api.github.com/repos/alphagov/govuk_elements/issues/405"},"comments":{"href":"https://api.github.com/repos/alphagov/govuk_elements/issues/405/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govuk_elements/pulls/405/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govuk_elements/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govuk_elements/pulls/405/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govuk_elements/statuses/a0ac333492ec15d661de76235a574f11baa7307f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":5,"additions":206,"deletions":56,"changed_files":10}}
{"actor":{"display_login":"gemmaleigh"}}