mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-12 04:13:13 +08:00
feat: validateFirst support parallel (#25321)
* feat: validateFirst support parallel * Update components/form/index.en-US.md Co-authored-by: xrkffgg <xrkffgg@gmail.com> * Update components/form/index.zh-CN.md Co-authored-by: xrkffgg <xrkffgg@gmail.com> Co-authored-by: xrkffgg <xrkffgg@gmail.com>
This commit is contained in:
parent
831349788e
commit
b46ea66a73
@ -70,7 +70,7 @@ describe('ConfigProvider', () => {
|
||||
const App = () => {
|
||||
const { renderEmpty } = React.useContext(ConfigContext);
|
||||
return renderEmpty();
|
||||
}
|
||||
};
|
||||
const wrapper = mount(
|
||||
<ConfigProvider>
|
||||
<App />
|
||||
|
@ -92,7 +92,7 @@ Form field component for data bidirectional binding, validation, layout, and so
|
||||
| rules | Rules for field validation. Click [here](#components-form-demo-basic) to see an example | [Rule](#Rule)[] | - | |
|
||||
| shouldUpdate | Custom field update logic. See [below](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false | |
|
||||
| trigger | When to collect the value of children node | string | `onChange` | |
|
||||
| validateFirst | Whether stop validate on first rule of error for this field | boolean | false | |
|
||||
| validateFirst | Whether stop validate on first rule of error for this field. Will parallel validate when `parallel` cofigured | boolean \| `parallel` | false | `parallel`: 4.5.0 |
|
||||
| validateStatus | The validation status. If not provided, it will be generated by validation rule. options: `success` `warning` `error` `validating` | string | - | |
|
||||
| validateTrigger | When to validate the value of children node | string \| string[] | `onChange` | |
|
||||
| valuePropName | Props of children node, for example, the prop of Switch is 'checked'. This prop is an encapsulation of `getValueProps`, which will be invalid after customizing `getValueProps` | string | `value` | |
|
||||
|
@ -93,7 +93,7 @@ const validateMessages = {
|
||||
| rules | 校验规则,设置字段的校验逻辑。点击[此处](#components-form-demo-basic)查看示例 | [Rule](#Rule)[] | - | |
|
||||
| shouldUpdate | 自定义字段更新逻辑,说明[见下](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false | |
|
||||
| trigger | 设置收集字段值变更的时机 | string | `onChange` | |
|
||||
| validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验 | boolean | false | |
|
||||
| validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验。设置 `parallel` 时会并行校验 | boolean \| `parallel` | false | `parallel`: 4.5.0 |
|
||||
| validateStatus | 校验状态,如不设置,则会根据校验规则自动生成,可选:'success' 'warning' 'error' 'validating' | string | - | |
|
||||
| validateTrigger | 设置字段校验的时机 | string \| string[] | `onChange` | |
|
||||
| valuePropName | 子节点的值的属性,如 Switch 的是 'checked'。该属性为 `getValueProps` 的封装,自定义 `getValueProps` 后会失效 | string | `value` | |
|
||||
|
@ -121,7 +121,7 @@
|
||||
"rc-dialog": "~8.0.0",
|
||||
"rc-drawer": "~4.1.0",
|
||||
"rc-dropdown": "~3.1.2",
|
||||
"rc-field-form": "~1.5.0",
|
||||
"rc-field-form": "~1.6.0",
|
||||
"rc-input-number": "~5.1.0",
|
||||
"rc-mentions": "~1.3.0",
|
||||
"rc-menu": "~8.3.0",
|
||||
|
Loading…
Reference in New Issue
Block a user