ant-design / ant-design/pro-components
🐛[BUG] 在 ProFormFeild label 属性里使用 FormattedMessage,且 rules 加了 required,报错信息会显示 [object Object]
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
### 🐛 bug 描述
如题
### 📷 复现步骤
用 ProFromSelect 举个例子
```jsx
}
name={['type']}
allowClear={false}
fieldProps={{
popupMatchSelectWidth: false,
}}
options={options}
rules={[{ required: true }]}
/>
```
### 🏞 期望结果
应该显示序列化后的字符串
### 💻 复现代码
### © 版本信息
- ProComponents 版本: 2.6.52
- umi 版本
- 浏览器环境 chrome
- 开发环境 mac OS
### 🚑 其他信息
Contributor guide
Research direction
Start from the ProFormSelect reproduction shown in the issue and trace how its label and required validation message are handled. Confirm the behavior with a required field using FormattedMessage; done means the validation error displays the serialized label string instead of [object Object].
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100