{"action":"closed","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/11381","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/11381/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/11381/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/11381/events","html_url":"https://github.com/ant-design/ant-design/issues/11381","id":343023455,"node_id":"MDU6SXNzdWUzNDMwMjM0NTU=","number":11381,"title":"The type definition in From ValidationRule is not match with async-validator","user":{"login":"LucienLee","id":1758453,"node_id":"MDQ6VXNlcjE3NTg0NTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1758453?v=4","gravatar_id":"","url":"https://api.github.com/users/LucienLee","html_url":"https://github.com/LucienLee","followers_url":"https://api.github.com/users/LucienLee/followers","following_url":"https://api.github.com/users/LucienLee/following{/other_user}","gists_url":"https://api.github.com/users/LucienLee/gists{/gist_id}","starred_url":"https://api.github.com/users/LucienLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucienLee/subscriptions","organizations_url":"https://api.github.com/users/LucienLee/orgs","repos_url":"https://api.github.com/users/LucienLee/repos","events_url":"https://api.github.com/users/LucienLee/events{/privacy}","received_events_url":"https://api.github.com/users/LucienLee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"yesmeck","id":465125,"node_id":"MDQ6VXNlcjQ2NTEyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/465125?v=4","gravatar_id":"","url":"https://api.github.com/users/yesmeck","html_url":"https://github.com/yesmeck","followers_url":"https://api.github.com/users/yesmeck/followers","following_url":"https://api.github.com/users/yesmeck/following{/other_user}","gists_url":"https://api.github.com/users/yesmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/yesmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesmeck/subscriptions","organizations_url":"https://api.github.com/users/yesmeck/orgs","repos_url":"https://api.github.com/users/yesmeck/repos","events_url":"https://api.github.com/users/yesmeck/events{/privacy}","received_events_url":"https://api.github.com/users/yesmeck/received_events","type":"User","site_admin":false},"assignees":[{"login":"yesmeck","id":465125,"node_id":"MDQ6VXNlcjQ2NTEyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/465125?v=4","gravatar_id":"","url":"https://api.github.com/users/yesmeck","html_url":"https://github.com/yesmeck","followers_url":"https://api.github.com/users/yesmeck/followers","following_url":"https://api.github.com/users/yesmeck/following{/other_user}","gists_url":"https://api.github.com/users/yesmeck/gists{/gist_id}","starred_url":"https://api.github.com/users/yesmeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yesmeck/subscriptions","organizations_url":"https://api.github.com/users/yesmeck/orgs","repos_url":"https://api.github.com/users/yesmeck/repos","events_url":"https://api.github.com/users/yesmeck/events{/privacy}","received_events_url":"https://api.github.com/users/yesmeck/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-07-20T08:47:18Z","updated_at":"2018-07-29T09:41:55Z","closed_at":"2018-07-29T09:41:55Z","author_association":"NONE","body":"- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.\r\n\r\n### Version\r\n3.7.0\r\n\r\n### Environment\r\nmacOS 10.13, Chrome 67\r\n\r\n### Steps to reproduce\r\nIn form rule, assign non-string type variable to `rules.message`  in getFieldDecorator. Typescript would get error.\r\n\r\n### What is expected?\r\nThe validated message in `getFieldDecorator` should be `any` or `ReactChild` (`type ReactChild = ReactElement<any> | ReactText`) according to [async-validator](https://github.com/yiminghe/async-validator#messages), which indicated messages is allowed to use element. \r\n\r\n### What is actually happening?\r\nThe [type definition](https://github.com/ant-design/ant-design/blob/ee0a7ce3bb37df62a18ff1701349f35fc1cc7d25/components/form/Form.tsx#L43) limited to string, which is too strict. If you want, I can make a PR to loose the type definition as `ReactChild`.\r\n\r\n\r\n<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->"}}
{"actor":{"display_login":"afc163"}}