[redux-form] Add additional params to ValidateCallback type (#42075)

This commit is contained in:
Jason Killian
2020-02-06 09:54:04 -08:00
committed by GitHub
parent f56665fac4
commit eb01d24998
2 changed files with 12 additions and 1 deletions
+2
View File
@@ -37,6 +37,8 @@ export interface ValidateCallback<FormData, P, ErrorType> {
nextProps: P & InjectedFormProps<FormData, P, ErrorType>;
props: P & InjectedFormProps<FormData, P, ErrorType>;
initialRender: boolean;
lastFieldValidatorKeys: string[];
fieldValidatorKeys: string[];
structure: any;
}
+10 -1
View File
@@ -242,7 +242,16 @@ const testFormWithChangeFunctionDecorator = reduxForm<TestFormData, TestFormComp
type TestProps = {} & InjectedFormProps<TestFormData>;
const Test = reduxForm<TestFormData>({
form : "test"
form : "test",
shouldError: ({
values,
nextProps,
props,
initialRender,
lastFieldValidatorKeys,
fieldValidatorKeys,
structure
}) => true,
})(
class Test extends React.Component<TestProps> {
handleSubmitForm = (values: Partial<TestFormData>, dispatch: Dispatch<any>, props: {}) => {};