{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive/issues/39","repository_url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive","labels_url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive/issues/39/comments","events_url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive/issues/39/events","html_url":"https://github.com/aspnet/jquery-validation-unobtrusive/issues/39","id":160405934,"number":39,"title":"Name attributes containing a dot do not work","user":{"login":"rok7","id":17645489,"avatar_url":"https://avatars.githubusercontent.com/u/17645489?v=3","gravatar_id":"","url":"https://api.github.com/users/rok7","html_url":"https://github.com/rok7","followers_url":"https://api.github.com/users/rok7/followers","following_url":"https://api.github.com/users/rok7/following{/other_user}","gists_url":"https://api.github.com/users/rok7/gists{/gist_id}","starred_url":"https://api.github.com/users/rok7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rok7/subscriptions","organizations_url":"https://api.github.com/users/rok7/orgs","repos_url":"https://api.github.com/users/rok7/repos","events_url":"https://api.github.com/users/rok7/events{/privacy}","received_events_url":"https://api.github.com/users/rok7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive/labels/investigate","name":"investigate","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"ryanbrandenburg","id":14987221,"avatar_url":"https://avatars.githubusercontent.com/u/14987221?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbrandenburg","html_url":"https://github.com/ryanbrandenburg","followers_url":"https://api.github.com/users/ryanbrandenburg/followers","following_url":"https://api.github.com/users/ryanbrandenburg/following{/other_user}","gists_url":"https://api.github.com/users/ryanbrandenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbrandenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbrandenburg/subscriptions","organizations_url":"https://api.github.com/users/ryanbrandenburg/orgs","repos_url":"https://api.github.com/users/ryanbrandenburg/repos","events_url":"https://api.github.com/users/ryanbrandenburg/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbrandenburg/received_events","type":"User","site_admin":false},"assignees":[{"login":"ryanbrandenburg","id":14987221,"avatar_url":"https://avatars.githubusercontent.com/u/14987221?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbrandenburg","html_url":"https://github.com/ryanbrandenburg","followers_url":"https://api.github.com/users/ryanbrandenburg/followers","following_url":"https://api.github.com/users/ryanbrandenburg/following{/other_user}","gists_url":"https://api.github.com/users/ryanbrandenburg/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbrandenburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbrandenburg/subscriptions","organizations_url":"https://api.github.com/users/ryanbrandenburg/orgs","repos_url":"https://api.github.com/users/ryanbrandenburg/repos","events_url":"https://api.github.com/users/ryanbrandenburg/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbrandenburg/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-06-15T12:06:40Z","updated_at":"2016-07-28T16:48:48Z","closed_at":null,"body":"When using nested properties, unobstrusive validation does not work.\r\nExample: \r\n```\r\n<span asp-validation-for=\"Customer.Phone\" class=\"text-danger\"></span>\r\n```\r\n\r\nThe reason for this is the escapeAttributeValue call in the function onError(), which removes the dot from the field name and therefore doesn't find the container with this name\r\n```\r\nfunction onError(error, inputElement) {\r\n   var container = $(this).find(\"[data-valmsg-for='\" + escapeAttributeValue(inputElement[0].name) + \"']\"),\r\n....\r\n\r\nfunction escapeAttributeValue(value) {\r\n        // As mentioned on http://api.jquery.com/category/selectors/\r\n        return value.replace(/([!\"#$%&'()*+,./:;<=>?@\\[\\\\\\]^`{|}~])/g, \"\\\\\\\\$1\");\r\n....\r\n```\r\n \r\n### Functional impact\r\nValidation does not work on nested properties\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive/issues/comments/235954625","html_url":"https://github.com/aspnet/jquery-validation-unobtrusive/issues/39#issuecomment-235954625","issue_url":"https://api.github.com/repos/aspnet/jquery-validation-unobtrusive/issues/39","id":235954625,"user":{"login":"szykov","id":16446651,"avatar_url":"https://avatars.githubusercontent.com/u/16446651?v=3","gravatar_id":"","url":"https://api.github.com/users/szykov","html_url":"https://github.com/szykov","followers_url":"https://api.github.com/users/szykov/followers","following_url":"https://api.github.com/users/szykov/following{/other_user}","gists_url":"https://api.github.com/users/szykov/gists{/gist_id}","starred_url":"https://api.github.com/users/szykov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szykov/subscriptions","organizations_url":"https://api.github.com/users/szykov/orgs","repos_url":"https://api.github.com/users/szykov/repos","events_url":"https://api.github.com/users/szykov/events{/privacy}","received_events_url":"https://api.github.com/users/szykov/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T16:48:48Z","updated_at":"2016-07-28T16:48:48Z","body":"Hi' i'm having the same issue. If i use nested properties jquery unobtrussive stops working.\r\ni'm using:\r\n    \"jquery\": \"2.2.4\",\r\n    \"jquery-validation\": \"1.15.0\",\r\n    \"jquery-validation-unobtrusive\": \"3.2.6\",\r\n\r\ni've created theme here also:\r\n\r\nhttp://stackoverflow.com/questions/38131201/jquery-unobtrusive-stops-working-if-asp-for-has-dots-in-name"}}
{"actor":{"display_login":"szykov"}}