From 5558398411d4c04afb0b72f8f8b44d71c18bdee2 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Wed, 30 Oct 2019 17:42:23 +0800 Subject: [PATCH] Form: callback of validateField should be optional (#17314) --- types/form.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/form.d.ts b/types/form.d.ts index 038214e5f..4b2b05a9a 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -72,11 +72,11 @@ export declare class ElForm extends ElementUIComponent { * @param props The property of `model` or array of prop which is going to validate * @param callback A callback to tell the field validation result */ - validateField (props: string | string[], callback: ValidateFieldCallback): void + validateField (props: string | string[], callback?: ValidateFieldCallback): void /** reset all the fields and remove validation result */ resetFields (): void - + /** clear validation message for certain fields */ clearValidate (props?: string | string[]): void }