{"action":"created","issue":{"url":"https://api.github.com/repos/formly-js/ng2-formly/issues/334","repository_url":"https://api.github.com/repos/formly-js/ng2-formly","labels_url":"https://api.github.com/repos/formly-js/ng2-formly/issues/334/labels{/name}","comments_url":"https://api.github.com/repos/formly-js/ng2-formly/issues/334/comments","events_url":"https://api.github.com/repos/formly-js/ng2-formly/issues/334/events","html_url":"https://github.com/formly-js/ng2-formly/issues/334","id":194763448,"number":334,"title":"Asynchronous resolution of validation messages","user":{"login":"Krisa","id":1253866,"avatar_url":"https://avatars.githubusercontent.com/u/1253866?v=3","gravatar_id":"","url":"https://api.github.com/users/Krisa","html_url":"https://github.com/Krisa","followers_url":"https://api.github.com/users/Krisa/followers","following_url":"https://api.github.com/users/Krisa/following{/other_user}","gists_url":"https://api.github.com/users/Krisa/gists{/gist_id}","starred_url":"https://api.github.com/users/Krisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krisa/subscriptions","organizations_url":"https://api.github.com/users/Krisa/orgs","repos_url":"https://api.github.com/users/Krisa/repos","events_url":"https://api.github.com/users/Krisa/events{/privacy}","received_events_url":"https://api.github.com/users/Krisa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-10T12:03:06Z","updated_at":"2016-12-10T12:54:41Z","closed_at":null,"body":"**I'm submitting a Feature (or Support) request **  (check one with \"x\")\r\n```\r\n[ ] bug report => search github for a similar issue or PR before submitting\r\n[ x ] feature request\r\n[ x ] support request\r\n```\r\n\r\n**Current behavior**\r\nThis is possible to customise validation messages in the `forRoot` function. However, even so it's possible to tweak the messages a bit by using a synchronous function, this does not seem possible to resolve messages asynchronously, through e.g. Observable (let me know if I missed something).\r\n\r\n**Expected behavior**\r\nDepending on the user language filling the form, it would be great to have an advanced customisation of  error messages. Observable would give the possibility to fetch data possibly remotely. \r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nMore flexibility\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/formly-js/ng2-formly/issues/comments/266205935","html_url":"https://github.com/formly-js/ng2-formly/issues/334#issuecomment-266205935","issue_url":"https://api.github.com/repos/formly-js/ng2-formly/issues/334","id":266205935,"user":{"login":"Krisa","id":1253866,"avatar_url":"https://avatars.githubusercontent.com/u/1253866?v=3","gravatar_id":"","url":"https://api.github.com/users/Krisa","html_url":"https://github.com/Krisa","followers_url":"https://api.github.com/users/Krisa/followers","following_url":"https://api.github.com/users/Krisa/following{/other_user}","gists_url":"https://api.github.com/users/Krisa/gists{/gist_id}","starred_url":"https://api.github.com/users/Krisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krisa/subscriptions","organizations_url":"https://api.github.com/users/Krisa/orgs","repos_url":"https://api.github.com/users/Krisa/repos","events_url":"https://api.github.com/users/Krisa/events{/privacy}","received_events_url":"https://api.github.com/users/Krisa/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T12:54:41Z","updated_at":"2016-12-10T12:54:41Z","body":"Guess I found something which fulfils partially what I'm asking: https://github.com/formly-js/ng2-formly/blob/503e803e27896f73042ef3024cad8321adf4a749/demo/hello.ts#L221 \r\n\r\n```\r\n         validators: {\r\n            city: {\r\n              expression: (control: FormControl) => control.value && control.value.length > 3,\r\n              message: `City: Should have atleast 3 Characters`,\r\n            },\r\n          },\r\n```\r\n\r\nBut it seems to only work when an `expression` is specified as well. Is there anything else?"}}
{"actor":{"display_login":"Krisa"}}