;
+ transformErrors?: ErrorTransformer;
}
// TODO(blam): We require here, as the types in this package depend on @rjsf/core explicitly
@@ -149,6 +151,19 @@ export const Stepper = (props: StepperProps) => {
onSubmit={handleNext}
fields={extensions}
showErrorList={false}
+ transformErrors={props.transformErrors}
+ // this is needed because handleNext is really triggering the validation
+ // which only happens onSubmit
+ onChange={({ formData, schema }) => {
+ if (props.transformErrors) {
+ validator.validateFormData(
+ formData,
+ schema,
+ undefined,
+ props.transformErrors,
+ );
+ }
+ }}
>