mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-30 12:52:43 +08:00
docs(form): fix clearValidationEffect => restoreValidation
This commit is contained in:
parent
7ef3357472
commit
fbbd4c667a
@ -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>.
|
||||
|
||||
|
@ -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>。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user