{"action":"opened","issue":{"url":"https://api.github.com/repos/aspnet/Mvc/issues/5402","repository_url":"https://api.github.com/repos/aspnet/Mvc","labels_url":"https://api.github.com/repos/aspnet/Mvc/issues/5402/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/5402/comments","events_url":"https://api.github.com/repos/aspnet/Mvc/issues/5402/events","html_url":"https://github.com/aspnet/Mvc/issues/5402","id":182499009,"number":5402,"title":"ErrorMessage for custom validation attributes is not localized","user":{"login":"mikkoha","id":18470487,"avatar_url":"https://avatars.githubusercontent.com/u/18470487?v=3","gravatar_id":"","url":"https://api.github.com/users/mikkoha","html_url":"https://github.com/mikkoha","followers_url":"https://api.github.com/users/mikkoha/followers","following_url":"https://api.github.com/users/mikkoha/following{/other_user}","gists_url":"https://api.github.com/users/mikkoha/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkoha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkoha/subscriptions","organizations_url":"https://api.github.com/users/mikkoha/orgs","repos_url":"https://api.github.com/users/mikkoha/repos","events_url":"https://api.github.com/users/mikkoha/events{/privacy}","received_events_url":"https://api.github.com/users/mikkoha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-12T11:14:09Z","updated_at":"2016-10-12T11:14:09Z","closed_at":null,"body":"For built in validation attributes the localization works as expected. However, I can not get localized messages for the validation attributes I have written my self.\r\n\r\nE.g. if I have in my ViewModel\r\n\r\n```\r\n[Required(ErrorMessage = \"MyErrorMessage\")]\r\npublic string MyFirstProperty { get; set; }\r\n\r\n[CustomRequired(ErrorMessage = \"MyErrorMessage\")]\r\npublic string MySecondProperty { get; set; }\r\n```\r\n\r\nonly the message of the first property is localized while for the second I just get the key as the message."}}
{"actor":{"display_login":"mikkoha"}}