{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/issues/788","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-userforms","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/issues/788/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/issues/788/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/issues/788/events","html_url":"https://github.com/silverstripe/silverstripe-userforms/issues/788","id":336857585,"node_id":"MDU6SXNzdWUzMzY4NTc1ODU=","number":788,"title":"Inconsistent validation message location","user":{"login":"aNickzz","id":15243523,"node_id":"MDQ6VXNlcjE1MjQzNTIz","avatar_url":"https://avatars3.githubusercontent.com/u/15243523?v=4","gravatar_id":"","url":"https://api.github.com/users/aNickzz","html_url":"https://github.com/aNickzz","followers_url":"https://api.github.com/users/aNickzz/followers","following_url":"https://api.github.com/users/aNickzz/following{/other_user}","gists_url":"https://api.github.com/users/aNickzz/gists{/gist_id}","starred_url":"https://api.github.com/users/aNickzz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aNickzz/subscriptions","organizations_url":"https://api.github.com/users/aNickzz/orgs","repos_url":"https://api.github.com/users/aNickzz/repos","events_url":"https://api.github.com/users/aNickzz/events{/privacy}","received_events_url":"https://api.github.com/users/aNickzz/received_events","type":"User","site_admin":false},"labels":[{"id":550172979,"node_id":"MDU6TGFiZWw1NTAxNzI5Nzk=","url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/labels/affects/v4","name":"affects/v4","color":"5319e7","default":false},{"id":3163051,"node_id":"MDU6TGFiZWwzMTYzMDUx","url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/labels/change/patch","name":"change/patch","color":"fef2c0","default":false},{"id":645070447,"node_id":"MDU6TGFiZWw2NDUwNzA0NDc=","url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/labels/effort/easy","name":"effort/easy","color":"c2e0c6","default":false},{"id":605339562,"node_id":"MDU6TGFiZWw2MDUzMzk1NjI=","url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/labels/impact/medium","name":"impact/medium","color":"f7c6c7","default":false},{"id":3163043,"node_id":"MDU6TGFiZWwzMTYzMDQz","url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/labels/type/bug","name":"type/bug","color":"d93f0b","default":false},{"id":605340538,"node_id":"MDU6TGFiZWw2MDUzNDA1Mzg=","url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/labels/type/frontend","name":"type/frontend","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-29T04:16:52Z","updated_at":"2018-07-02T21:52:01Z","closed_at":null,"author_association":"NONE","body":"In [FormField_holder.ss](https://github.com/silverstripe/silverstripe-framework/blob/4/templates/SilverStripe/Forms/FormField_holder.ss), server side messages are inserted as a `<span class=\"message\">` after the `.middleColumn`.\r\nThe validation performed in [UserForms.js](https://github.com/silverstripe/silverstripe-userforms/blob/f758ae3e03a936ed235131419ba1a57b2673c5be/client/src/bundles/UserForms.js#L496) inserts the error messages directly after the input, _inside_ the `.middleColumn`.\r\n\r\nI have had a look through the history and there isn't any reason explaining why it's placed where it is.\r\n\r\nIs there a reason why the whole if/elseif block from 491 - 497 can't be replaced with 494?"},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/issues/comments/401949205","html_url":"https://github.com/silverstripe/silverstripe-userforms/issues/788#issuecomment-401949205","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-userforms/issues/788","id":401949205,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTk0OTIwNQ==","user":{"login":"NightJar","id":778003,"node_id":"MDQ6VXNlcjc3ODAwMw==","avatar_url":"https://avatars2.githubusercontent.com/u/778003?v=4","gravatar_id":"","url":"https://api.github.com/users/NightJar","html_url":"https://github.com/NightJar","followers_url":"https://api.github.com/users/NightJar/followers","following_url":"https://api.github.com/users/NightJar/following{/other_user}","gists_url":"https://api.github.com/users/NightJar/gists{/gist_id}","starred_url":"https://api.github.com/users/NightJar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NightJar/subscriptions","organizations_url":"https://api.github.com/users/NightJar/orgs","repos_url":"https://api.github.com/users/NightJar/repos","events_url":"https://api.github.com/users/NightJar/events{/privacy}","received_events_url":"https://api.github.com/users/NightJar/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T21:52:01Z","updated_at":"2018-07-02T21:52:01Z","author_association":"CONTRIBUTOR","body":"Ideally yes, you're right - it would be best if one couldn't tell if a validation message had come from JS or PHP. To be honest it's always irked me as well.\r\n\r\nThe issue with finding the `.message` in the closest `.field` is that message boxes don't exist until there is a message to be rendered - and since we're shorting the feedback loop a whole submit/response cycle it's this JS that must add one. The case should be by first load that there is _never_ a message box for a field (at least not a validation error), so it would be incorrect to consider that situation an error."}}
{"actor":{"display_login":"NightJar"}}