Browse Source

docs: modify the doc of Form.Item messageVariables (#41959)

pull/41967/head
GUAN MING 2 years ago
committed by GitHub
parent
commit
2aa80491b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      components/form/index.en-US.md
  2. 12
      components/form/index.zh-CN.md

12
components/form/index.en-US.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>

12
components/form/index.zh-CN.md

@ -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>

Loading…
Cancel
Save