{"action":"created","issue":{"url":"https://api.github.com/repos/theadam/react-inform/issues/2","repository_url":"https://api.github.com/repos/theadam/react-inform","labels_url":"https://api.github.com/repos/theadam/react-inform/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/theadam/react-inform/issues/2/comments","events_url":"https://api.github.com/repos/theadam/react-inform/issues/2/events","html_url":"https://github.com/theadam/react-inform/issues/2","id":140729931,"number":2,"title":"i18n format error messages with react-intl","user":{"login":"VincentCordobes","id":7091110,"avatar_url":"https://avatars.githubusercontent.com/u/7091110?v=3","gravatar_id":"","url":"https://api.github.com/users/VincentCordobes","html_url":"https://github.com/VincentCordobes","followers_url":"https://api.github.com/users/VincentCordobes/followers","following_url":"https://api.github.com/users/VincentCordobes/following{/other_user}","gists_url":"https://api.github.com/users/VincentCordobes/gists{/gist_id}","starred_url":"https://api.github.com/users/VincentCordobes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VincentCordobes/subscriptions","organizations_url":"https://api.github.com/users/VincentCordobes/orgs","repos_url":"https://api.github.com/users/VincentCordobes/repos","events_url":"https://api.github.com/users/VincentCordobes/events{/privacy}","received_events_url":"https://api.github.com/users/VincentCordobes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T16:46:05Z","updated_at":"2016-03-14T17:32:12Z","closed_at":null,"body":"Hi,\r\nI am trying to use the **formatMessage** function from **react-intl v2** to display error messages.\r\nThis function is injected to a component with injectIntl(), we can then access it via props.\r\nSince error strings are hard coded in the form decorator, do you have any advise to make it works with react-intl ?"},"comment":{"url":"https://api.github.com/repos/theadam/react-inform/issues/comments/196425312","html_url":"https://github.com/theadam/react-inform/issues/2#issuecomment-196425312","issue_url":"https://api.github.com/repos/theadam/react-inform/issues/2","id":196425312,"user":{"login":"theadam","id":850881,"avatar_url":"https://avatars.githubusercontent.com/u/850881?v=3","gravatar_id":"","url":"https://api.github.com/users/theadam","html_url":"https://github.com/theadam","followers_url":"https://api.github.com/users/theadam/followers","following_url":"https://api.github.com/users/theadam/following{/other_user}","gists_url":"https://api.github.com/users/theadam/gists{/gist_id}","starred_url":"https://api.github.com/users/theadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theadam/subscriptions","organizations_url":"https://api.github.com/users/theadam/orgs","repos_url":"https://api.github.com/users/theadam/repos","events_url":"https://api.github.com/users/theadam/events{/privacy}","received_events_url":"https://api.github.com/users/theadam/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T17:32:12Z","updated_at":"2016-03-14T17:32:12Z","body":"Take a look at this example: https://jsfiddle.net/theadam/d0hypvtz/3/.\r\n\r\nSince you have control of the validate function, there's no reason you cant return something other than strings there.  Here I am returning a react-intl MessageDescriptor instead of strings.  \r\n\r\nNotice in the `email` field, you even have a chance to pass in `values` so that react-intl can fill in some placeholders.\r\n\r\nLet me know if this solution will work for you!"}}