Add missing asyncValidate argument

This commit is contained in:
Omer Bokhari
2017-02-10 22:48:48 -08:00
parent a01e02004b
commit 7f7b9dfddc
+5 -5
View File
@@ -48,14 +48,14 @@ export interface Config<FormData extends DataShape, P, S> {
asyncBlurFields?: string[];
/**
* a function that takes all the form values, the dispatch function, and
* the props given to your component, and returns a Promise that will
* resolve if the validation is passed, or will reject with an object of
* validation errors in the form { field1: <String>, field2: <String> }.
* a function that takes all the form values, the dispatch function,
* the props given to your component and the current blurred field,
* and returns a Promise that will resolve if the validation is passed,
* or will reject with an object of validation errors in the form { field1: <String>, field2: <String> }.
*
* See Asynchronous Blur Validation Example for more details.
*/
asyncValidate?(values: FormData, dispatch: Dispatch<S>, props: P): Promise<any>;
asyncValidate?(values: FormData, dispatch: Dispatch<S>, props: P, blurredField: string): Promise<any>;
/**
* Whether or not to automatically destroy your form's state in the Redux