Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 8e622af

Browse files
committed
Updating type defs for setErrors and setFieldsErrors for options param. Fixes #710
1 parent 194c97d commit 8e622af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

react-redux-form.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,7 @@ interface Actions {
960960
* This action allows you to set the errors for multiple submodels of a model at the same time. Similar to setFieldsValidity but for errors
961961
* @param model The top level form model
962962
* @param fieldsErrors An object where the keys are field paths and the value is error object
963+
* @param options { async: true } if the error is an error from async validation.
963964
*/
964965
setFieldsErrors: (model: string, fieldsErrors: FieldsObject<ErrorsObject | boolean | string>) => FieldAction;
965966

@@ -989,6 +990,7 @@ interface Actions {
989990
*
990991
* @param model
991992
* @param errors A truthy/falsey value, a string error message, or an object indicating which error keys of the field model are invalid via booleans (where true is invalid) or strings (set specific error messages, not advised).
993+
* @param options { async: true } if the error is an error from async validation.
992994
*/
993995
setErrors: (model: string, errors: boolean | string | ErrorsObject) => FieldAction;
994996

0 commit comments

Comments
 (0)