ant-design / ant-design/pro-components

🐛[BUG] 使用可编辑表格时,在renderFormItem里返回的ProFormSelect 的rules 没有进行规则校验

Open
#8,557 1 comment 0 reactions 0 assignees View on GitHub
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 描述

### 📷 复现步骤
- 点击编辑
- 编辑状态为“全部”
- 点击保存
- 描述,没有必填也保存成功了
### 🏞 期望结果

- 描述应该提示错误,进行必填校验

描述和前面的名称一样,如果必填,编辑的保存点击提示错误

### 💻 复现代码

[示例代码](https://codesandbox.io/p/sandbox/yu-formitem-pei-he-forked-dx94ws?file=%2FApp.tsx%3A40%2C13)

### © 版本信息

- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

![image](https://github.com/ant-design/pro-components/assets/31272499/764d2084-7e62-4808-811f-104cc7a9d056)

如果使用`formItemProps`复制rules ,点击保存的时候返回了错误,页面没有展示具体哪个字段错误了

![image](https://github.com/ant-design/pro-components/assets/31272499/628c13a5-a7ff-496a-922c-fe56280213ce)

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and trace the editable table flow involving renderFormItem, ProFormSelect, and formItemProps rules. Confirm the case where selecting “全部” should make the description required, then verify that saving shows the specific field validation error and prevents submission.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.