Merge pull request #16524 from vicrep/patch-1

fix(forms): improve field error method type defs
This commit is contained in:
偏右 2019-05-11 14:02:12 +08:00 committed by GitHub
commit b3e90d7390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,8 +171,8 @@ export type WrappedFormUtils<V = any> = {
validateFieldsAndScroll(options: ValidateFieldsOptions): void;
validateFieldsAndScroll(): void;
/** 获取某个输入控件的 Error */
getFieldError(name: string): Object[];
getFieldsError(names?: Array<string>): Object;
getFieldError(name: string): string[] | undefined;
getFieldsError(names?: Array<string>): Record<string, string[] | undefined>;
/** 判断一个输入控件是否在校验状态 */
isFieldValidating(name: string): boolean;
isFieldTouched(name: string): boolean;