Skip to content

Commit 4331a57

Browse files
authored
validate callback 返回类型错误 (#2650)
如果返回的是 Boolean 类型,做 if 判断的时候,结果会被认为永远是 true
1 parent cd467ab commit 4331a57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/form-model/form.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export declare class FormModel extends AntdComponent {
153153
* and an object containing all fields that fail the validation. Returns a promise if callback is omitted
154154
* @type Function
155155
*/
156-
validate: (callback?: (boolean: Boolean, object: Object) => void) => void | Promise<any>;
156+
validate: (callback?: (boolean: boolean, object: Object) => void) => void | Promise<any>;
157157

158158
/**
159159
* validate one or several form items

0 commit comments

Comments
 (0)