{"action":"created","issue":{"url":"https://api.github.com/repos/einpraegsam/powermail/issues/62","repository_url":"https://api.github.com/repos/einpraegsam/powermail","labels_url":"https://api.github.com/repos/einpraegsam/powermail/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/einpraegsam/powermail/issues/62/comments","events_url":"https://api.github.com/repos/einpraegsam/powermail/issues/62/events","html_url":"https://github.com/einpraegsam/powermail/issues/62","id":222383324,"number":62,"title":"error messages in the field partial","user":{"login":"pixelplant","id":492082,"avatar_url":"https://avatars1.githubusercontent.com/u/492082?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelplant","html_url":"https://github.com/pixelplant","followers_url":"https://api.github.com/users/pixelplant/followers","following_url":"https://api.github.com/users/pixelplant/following{/other_user}","gists_url":"https://api.github.com/users/pixelplant/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelplant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelplant/subscriptions","organizations_url":"https://api.github.com/users/pixelplant/orgs","repos_url":"https://api.github.com/users/pixelplant/repos","events_url":"https://api.github.com/users/pixelplant/events{/privacy}","received_events_url":"https://api.github.com/users/pixelplant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-18T11:19:38Z","updated_at":"2017-04-18T11:31:01Z","closed_at":null,"body":"Hello\r\n\r\nThis is not necessarily an issue but more of a question/request.\r\n\r\nHow would one display the error messages directly in the field's partial? In my custom template each field has 2 columns, the left one holds the label and field(input), while the right one displays the error message/s, if any are present during validation.\r\n\r\nI do not want to display them before all the form fields (so have removed the Misc/FormError partial), but to the right side, next to each field.\r\n\r\nI can call vh:Validation.ErrorClass to see if an error is present and update the CSS class, but how would I go about showing the actual error message?\r\n\r\nI tried calling this in the Partials/Form/Field/Input.html for example, but no error message is displayed:\r\n```\r\n<f:form.validationResults for=\"{field.marker}\">\r\n\t<f:if condition=\"{validationResults.flattenedErrors}\">\r\n\t\t<f:for each=\"{validationResults.errors}\" as=\"error\">\r\n\t\t\t<p class=\"error\">{error.code}: {error}</p>\r\n\t\t</f:for>\r\n\t</f:if>\r\n</f:form.validationResults>\r\n```\r\n\r\nI'm out of ideas so far so any help is more than welcomed.\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/einpraegsam/powermail/issues/comments/294795468","html_url":"https://github.com/einpraegsam/powermail/issues/62#issuecomment-294795468","issue_url":"https://api.github.com/repos/einpraegsam/powermail/issues/62","id":294795468,"user":{"login":"pixelplant","id":492082,"avatar_url":"https://avatars1.githubusercontent.com/u/492082?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelplant","html_url":"https://github.com/pixelplant","followers_url":"https://api.github.com/users/pixelplant/followers","following_url":"https://api.github.com/users/pixelplant/following{/other_user}","gists_url":"https://api.github.com/users/pixelplant/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelplant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelplant/subscriptions","organizations_url":"https://api.github.com/users/pixelplant/orgs","repos_url":"https://api.github.com/users/pixelplant/repos","events_url":"https://api.github.com/users/pixelplant/events{/privacy}","received_events_url":"https://api.github.com/users/pixelplant/received_events","type":"User","site_admin":false},"created_at":"2017-04-18T11:31:01Z","updated_at":"2017-04-18T11:31:01Z","body":"I got it working like this, but seems stupid to have to go through ALL the error messages for every field and then display the error messages for the current field only...\r\n```\r\n<f:form.validationResults>\r\n\t<f:if condition=\"{validationResults.flattenedErrors}\">\r\n\t\t\t<f:for each=\"{validationResults.flattenedErrors}\" as=\"errors\">\r\n\t\t\t\t<f:for each=\"{errors}\" as=\"singleError\">\r\n\t\t\t\t\t<f:if condition=\"{field.marker} == {singleError.code}\">\r\n\t\t\t\t\t\t<p class=\"error\">\r\n\t\t\t\t\t\t\t<f:translate key=\"validationerror_{singleError.message}\">{singleError.message}</f:translate>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</f:if>\r\n\t\t\t\t</f:for>\r\n\t\t\t</f:for>\r\n\t</f:if>\r\n</f:form.validationResults>\r\n```"}}
{"actor":{"display_login":"pixelplant"}}