Skip to content

Commit 5558398

Browse files
CarterLiisland205
authored andcommitted
Form: callback of validateField should be optional (ElemeFE#17314)
1 parent ed73a1b commit 5558398

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

types/form.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ export declare class ElForm extends ElementUIComponent {
7272
* @param props The property of `model` or array of prop which is going to validate
7373
* @param callback A callback to tell the field validation result
7474
*/
75-
validateField (props: string | string[], callback: ValidateFieldCallback): void
75+
validateField (props: string | string[], callback?: ValidateFieldCallback): void
7676

7777
/** reset all the fields and remove validation result */
7878
resetFields (): void
79-
79+
8080
/** clear validation message for certain fields */
8181
clearValidate (props?: string | string[]): void
8282
}

0 commit comments

Comments
 (0)