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

Commit 74b196f

Browse files
committed
Merge branch 'master' of github.com:davidkpiano/react-redux-form
2 parents 8579917 + 42bab1a commit 74b196f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"invariant": "~2.2.1",
9494
"lodash.get": "~4.4.2",
9595
"lodash.topath": "~4.5.2",
96-
"shallow-compare": "1.2.0"
96+
"shallow-compare": "1.2.1"
9797
},
9898
"peerDependencies": {
9999
"react": "^0.14.0 || ^15.0.0",

react-redux-form.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ interface ValidityOptions {
694694
errors?: boolean;
695695
}
696696

697+
interface SetErrorsOptions {
698+
async?: boolean;
699+
}
700+
697701
interface Actions {
698702
/* ------ ------ ------ ------ */
699703
/* ------ Model Actions ------ */
@@ -962,7 +966,7 @@ interface Actions {
962966
* @param fieldsErrors An object where the keys are field paths and the value is error object
963967
* @param options { async: true } if the error is an error from async validation.
964968
*/
965-
setFieldsErrors: (model: string, fieldsErrors: FieldsObject<ErrorsObject | boolean | string>) => FieldAction;
969+
setFieldsErrors: (model: string, fieldsErrors: FieldsObject<ErrorsObject | boolean | string>, options?: SetErrorsOptions) => FieldAction;
966970

967971

968972

@@ -992,7 +996,7 @@ interface Actions {
992996
* @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).
993997
* @param options { async: true } if the error is an error from async validation.
994998
*/
995-
setErrors: (model: string, errors: boolean | string | ErrorsObject) => FieldAction;
999+
setErrors: (model: string, errors: boolean | string | ErrorsObject, options?: SetErrorsOptions) => FieldAction;
9961000

9971001
/**
9981002
* Returns an action thunk that calculates the errors of the model based on the function/object errorValidators. Then, the thunk dispatches actions.setErrors(model, errors).

0 commit comments

Comments
 (0)