validate callback 返回类型错误 (#2650)

如果返回的是 Boolean 类型,做 if 判断的时候,结果会被认为永远是 true
pull/2666/head
ken 2020-08-10 14:01:54 +08:00 committed by GitHub
parent cd467abf18
commit 4331a577ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ export declare class FormModel extends AntdComponent {
* and an object containing all fields that fail the validation. Returns a promise if callback is omitted
* @type Function
*/
validate: (callback?: (boolean: Boolean, object: Object) => void) => void | Promise<any>;
validate: (callback?: (boolean: boolean, object: Object) => void) => void | Promise<any>;
/**
* validate one or several form items