Browse Source

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

如果返回的是 Boolean 类型,做 if 判断的时候,结果会被认为永远是 true
pull/2666/head
ken 4 years ago committed by GitHub
parent
commit
4331a577ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      types/form-model/form.d.ts

2
types/form-model/form.d.ts vendored

@ -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

Loading…
Cancel
Save