From 588dd3033fa29a756462329d9f7ca63993d75198 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 15 Feb 2017 14:39:55 +0800 Subject: [PATCH] docs: update for customizing validation --- components/form/demo/validate-static.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/components/form/demo/validate-static.md b/components/form/demo/validate-static.md index e04c488b96..1ba1ab64aa 100644 --- a/components/form/demo/validate-static.md +++ b/components/form/demo/validate-static.md @@ -1,25 +1,25 @@ --- order: 10 title: - zh-CN: 校验提示 - en-US: Validation message + zh-CN: 自定义校验 + en-US: Customized Validation --- ## zh-CN -我们为表单控件定义了三种校验状态,为 `` 定义 `validateStatus` 属性即可。 +我们提供了 `validateStatus` `help` `hasFeedback` 等属性,你可以不需要使用 `Form.create` 和 `getFieldDecorator`,自己定义校验的时机和内容。 -validateStatus: 'success', 'warning', 'error', 'validating'。 - -另外为输入框添加反馈图标,设置 `` 的 `hasFeedback` 属性值为 `true` 即可。 +1. `validateStatus`: 校验状态,可选 'success', 'warning', 'error', 'validating'。 +2. `hasFeedback`:用于给输入框添加反馈图标。 +3. `help`:设置校验文案。 ## en-US -We provide three kinds of validation status for form. You can use it just define `validateStatus` property on ``. - -validateStatus: 'success', 'warning', 'error', 'validating'。 +We provide properties like `validateStatus` `help` `hasFeedback` to customize your own validate status and message, without using `Form.create` and `getFieldDecorator`. -To set `hasFeedback` property to `true` enable to display feed icon of input control. +1. `validateStatus`: validate status of form components which could be 'success', 'warning', 'error', 'validating'. +2. `hasFeedback`: display feed icon of input control +3. `help`: display validate message. ````jsx import { Form, Input, DatePicker, Col } from 'antd';