{"action":"created","issue":{"url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/issues/226","repository_url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator","labels_url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/issues/226/comments","events_url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/issues/226/events","html_url":"https://github.com/victorjonsson/jQuery-Form-Validator/issues/226","id":64011865,"number":226,"title":"Element error message position","user":{"login":"mantoze","id":4608590,"avatar_url":"https://avatars.githubusercontent.com/u/4608590?v=3","gravatar_id":"","url":"https://api.github.com/users/mantoze","html_url":"https://github.com/mantoze","followers_url":"https://api.github.com/users/mantoze/followers","following_url":"https://api.github.com/users/mantoze/following{/other_user}","gists_url":"https://api.github.com/users/mantoze/gists{/gist_id}","starred_url":"https://api.github.com/users/mantoze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantoze/subscriptions","organizations_url":"https://api.github.com/users/mantoze/orgs","repos_url":"https://api.github.com/users/mantoze/repos","events_url":"https://api.github.com/users/mantoze/events{/privacy}","received_events_url":"https://api.github.com/users/mantoze/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/labels/Fixed%20in%20next%20release","name":"Fixed in next release","color":"006b75"},{"url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/labels/Improvement","name":"Improvement","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/milestones/3","html_url":"https://github.com/victorjonsson/jQuery-Form-Validator/milestones/2.3.0","labels_url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/milestones/3/labels","id":1324988,"number":3,"title":"2.3.0","description":"","creator":{"login":"victorjonsson","id":429182,"avatar_url":"https://avatars.githubusercontent.com/u/429182?v=3","gravatar_id":"","url":"https://api.github.com/users/victorjonsson","html_url":"https://github.com/victorjonsson","followers_url":"https://api.github.com/users/victorjonsson/followers","following_url":"https://api.github.com/users/victorjonsson/following{/other_user}","gists_url":"https://api.github.com/users/victorjonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/victorjonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorjonsson/subscriptions","organizations_url":"https://api.github.com/users/victorjonsson/orgs","repos_url":"https://api.github.com/users/victorjonsson/repos","events_url":"https://api.github.com/users/victorjonsson/events{/privacy}","received_events_url":"https://api.github.com/users/victorjonsson/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":1,"state":"open","created_at":"2015-09-26T14:57:42Z","updated_at":"2016-02-19T08:50:06Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-03-24T14:36:50Z","updated_at":"2016-03-02T13:11:35Z","closed_at":null,"body":"Now element error message goes to:\r\n<span class=\"help-block form-error\">...</span>\r\n\r\nHow to send element error message to my own div (example: div class=\"my-error\").\r\nThis div have all elements of the form."},"comment":{"url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/issues/comments/191233456","html_url":"https://github.com/victorjonsson/jQuery-Form-Validator/issues/226#issuecomment-191233456","issue_url":"https://api.github.com/repos/victorjonsson/jQuery-Form-Validator/issues/226","id":191233456,"user":{"login":"victorjonsson","id":429182,"avatar_url":"https://avatars.githubusercontent.com/u/429182?v=3","gravatar_id":"","url":"https://api.github.com/users/victorjonsson","html_url":"https://github.com/victorjonsson","followers_url":"https://api.github.com/users/victorjonsson/followers","following_url":"https://api.github.com/users/victorjonsson/following{/other_user}","gists_url":"https://api.github.com/users/victorjonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/victorjonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/victorjonsson/subscriptions","organizations_url":"https://api.github.com/users/victorjonsson/orgs","repos_url":"https://api.github.com/users/victorjonsson/repos","events_url":"https://api.github.com/users/victorjonsson/events{/privacy}","received_events_url":"https://api.github.com/users/victorjonsson/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T13:11:35Z","updated_at":"2016-03-02T13:11:35Z","body":"This will change a bit. This is how the implementation will look\r\n\r\n```js\r\nconfig.errorMessagePosition = function(args) {\r\n   switch(args.context) {\r\n      case 'inline':\r\n         // Return an element that should contain the error message.\r\n         // This callback will only be called in case validateOnBlur is set to true (which is default) \r\n         // Return false to prevent the error dialog from being displayed\r\n         break;\r\n      case 'form':\r\n         //  Return an element that should contain all error messages\r\n         //  Return false to prevent the error dialogs from being displayed\r\n         break;\r\n  }\r\n};\r\n```\r\n\r\nContent of `args`\r\n\r\n```js\r\n{\r\n   context: 'inline', // Either 'inline' or 'form'\r\n   errorMessages: [] // Array with error messages that will be applied. This can also be an empty array if the validator is about to remove an error message\r\n   $input: ...; // Only present if context is inline, referring to the input that triggered the failed validation\r\n   $form: ...; // Only present if context is form, referring to the validated form \r\n}\r\n```"}}