docs(form): fix clearValidationEffect => restoreValidation

This commit is contained in:
07akioni 2021-06-13 12:39:01 +08:00
parent 7ef3357472
commit fbbd4c667a
2 changed files with 4 additions and 4 deletions

View File

@ -78,14 +78,14 @@ Accept all props from FormItem & [GridItem](grid#GridItem-Props)
| Name | Type | Description |
| --- | --- | --- |
| validate | `(validateCallback?: (errors?: Array<ValidationError>) => void, shouldRuleBeApplied?: FormItemRule => boolean) => Promise<void>` | Validate the form. The rejection value type of returned promise is `Array<ValidationError>`. |
| clearValidationEffect | `() => void` | |
| restoreValidation | `() => void` | |
### FormItem, FormItemGi Methods
| Name | Type | Description |
| --- | --- | --- |
| validate | `(options: { trigger?: string, callback?: (errors?: Array<ValidationError>) => void, shouldRuleBeApplied?: FormItemRule => boolean, options?: AsyncValidatorOptions }) => Promise<void>` | Validate the form item. The rejection value type of returned promise is `Array<ValidationError>`. If trigger is not set, all rules of the item will be applied. `shouldRuleBeApplied` can filter rules after they are filtered by the trigger. |
| clearValidationEffect | `() => void` | |
| restoreValidation | `() => void` | |
About AsyncValidatorOptions, see <n-a href="https://github.com/yiminghe/async-validator">async-validator</n-a>.

View File

@ -79,14 +79,14 @@ validator-debug
| 名称 | 类型 | 说明 |
| --- | --- | --- |
| validate | `(validateCallback?: (errors?: Array<ValidationError>) => void, shouldRuleBeApplied?: FormItemRule => boolean) => Promise<void>` | 验证表单。Promise rejection 的返回值类型是 `Array<ValidationError>`。 |
| clearValidationEffect | `() => void` | |
| restoreValidation | `() => void` | |
### FormItem, FormItemGi Methods
| 名称 | 类型 | 说明 |
| --- | --- | --- |
| validate | `(options: { trigger?: string, callback?: (errors?: Array<ValidationError>) => void, shouldRuleBeApplied?: FormItemRule => boolean, options?: AsyncValidatorOptions }) => Promise<void>` | 验证表项Promise rejection 的返回值类型是 `Array<ValidationError>`。如果设定 `trigger`,这一个表项全部的规则都会被使用。`shouldRuleBeApplied` 可以用来进一步过滤已经经过 `trigger` 筛选的规则 |
| clearValidationEffect | `() => void` | |
| restoreValidation | `() => void` | |
关于 AsyncValidatorOptions参考 <n-a href="https://github.com/yiminghe/async-validator">async-validator</n-a>