GUAN MING
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
20 additions and
4 deletions
-
components/form/index.en-US.md
-
components/form/index.zh-CN.md
|
@ -194,10 +194,18 @@ You can modify the default verification information of Form.Item through `messag |
|
|
|
|
|
|
|
|
```jsx |
|
|
```jsx |
|
|
<Form> |
|
|
<Form> |
|
|
<Form.Item messageVariables={{ another: 'good' }} label="user"> |
|
|
<Form.Item |
|
|
|
|
|
messageVariables={{ another: 'good' }} |
|
|
|
|
|
label="user" |
|
|
|
|
|
rules={[{ required: true, message: '${another} is required' }]} |
|
|
|
|
|
> |
|
|
<Input /> |
|
|
<Input /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
<Form.Item messageVariables={{ label: 'good' }} label={<span>user</span>}> |
|
|
<Form.Item |
|
|
|
|
|
messageVariables={{ label: 'good' }} |
|
|
|
|
|
label={<span>user</span>} |
|
|
|
|
|
rules={[{ required: true, message: '${label} is required' }]} |
|
|
|
|
|
> |
|
|
<Input /> |
|
|
<Input /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
</Form> |
|
|
</Form> |
|
|
|
@ -195,10 +195,18 @@ Form 通过增量更新方式,只更新被修改的字段相关组件以达到 |
|
|
|
|
|
|
|
|
```jsx |
|
|
```jsx |
|
|
<Form> |
|
|
<Form> |
|
|
<Form.Item messageVariables={{ another: 'good' }} label="user"> |
|
|
<Form.Item |
|
|
|
|
|
messageVariables={{ another: 'good' }} |
|
|
|
|
|
label="user" |
|
|
|
|
|
rules={[{ required: true, message: '${another} is required' }]} |
|
|
|
|
|
> |
|
|
<Input /> |
|
|
<Input /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
<Form.Item messageVariables={{ label: 'good' }} label={<span>user</span>}> |
|
|
<Form.Item |
|
|
|
|
|
messageVariables={{ label: 'good' }} |
|
|
|
|
|
label={<span>user</span>} |
|
|
|
|
|
rules={[{ required: true, message: '${label} is required' }]} |
|
|
|
|
|
> |
|
|
<Input /> |
|
|
<Input /> |
|
|
</Form.Item> |
|
|
</Form.Item> |
|
|
</Form> |
|
|
</Form> |
|
|