{"action":"created","issue":{"url":"https://api.github.com/repos/huei90/angular-validation/issues/96","labels_url":"https://api.github.com/repos/huei90/angular-validation/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/huei90/angular-validation/issues/96/comments","events_url":"https://api.github.com/repos/huei90/angular-validation/issues/96/events","html_url":"https://github.com/huei90/angular-validation/issues/96","id":62388877,"number":96,"title":"Translate default messages","user":{"login":"jamhall","id":368589,"avatar_url":"https://avatars.githubusercontent.com/u/368589?v=3","gravatar_id":"","url":"https://api.github.com/users/jamhall","html_url":"https://github.com/jamhall","followers_url":"https://api.github.com/users/jamhall/followers","following_url":"https://api.github.com/users/jamhall/following{/other_user}","gists_url":"https://api.github.com/users/jamhall/gists{/gist_id}","starred_url":"https://api.github.com/users/jamhall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamhall/subscriptions","organizations_url":"https://api.github.com/users/jamhall/orgs","repos_url":"https://api.github.com/users/jamhall/repos","events_url":"https://api.github.com/users/jamhall/events{/privacy}","received_events_url":"https://api.github.com/users/jamhall/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-17T12:56:44Z","updated_at":"2015-05-11T04:05:05Z","closed_at":"2015-05-11T04:05:05Z","body":"Hello,\r\n\r\nGreat module!\r\n\r\nI would like to translate the default messages for example, I have this:\r\n\r\n```\r\n  app.config(['$validationProvider', function ($validationProvider) {\r\n    var expression = {\r\n      required: function (value) {\r\n        return !!value;\r\n      }\r\n    };\r\n\r\n    var defaultMsg = {\r\n      required: {\r\n        error: 'generic.form.validations.required'\r\n      }\r\n    };\r\n\r\n    $validationProvider.setExpression(expression).setDefaultMsg(defaultMsg);\r\n\r\n    $validationProvider.setErrorHTML(function (msg) {\r\n      return \"<span class=\\\"label label-danger\\\">{{ msg | translate }}</span>\";\r\n    });\r\n  }]);\r\n```\r\n\r\nPlease note that `generic.form.validations.required` is a translation key.\r\n\r\nIt would be nice if this module could interpolate the error html so I have the translated message.\r\n\r\nAny ideas to solve this?\r\n\r\nThanks!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/huei90/angular-validation/issues/comments/100757776","html_url":"https://github.com/huei90/angular-validation/issues/96#issuecomment-100757776","issue_url":"https://api.github.com/repos/huei90/angular-validation/issues/96","id":100757776,"user":{"login":"huei90","id":2560096,"avatar_url":"https://avatars.githubusercontent.com/u/2560096?v=3","gravatar_id":"","url":"https://api.github.com/users/huei90","html_url":"https://github.com/huei90","followers_url":"https://api.github.com/users/huei90/followers","following_url":"https://api.github.com/users/huei90/following{/other_user}","gists_url":"https://api.github.com/users/huei90/gists{/gist_id}","starred_url":"https://api.github.com/users/huei90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huei90/subscriptions","organizations_url":"https://api.github.com/users/huei90/orgs","repos_url":"https://api.github.com/users/huei90/repos","events_url":"https://api.github.com/users/huei90/events{/privacy}","received_events_url":"https://api.github.com/users/huei90/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T04:05:05Z","updated_at":"2015-05-11T04:05:05Z","body":"Hi @jamhall I prefer not to do this in the validation method. We should handle this on the javascript function, not in angular way.\r\n\r\nI'm going to close this, open it if needed."}}