Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan committed Mar 1, 2024
1 parent bbc8bbc commit b0f5426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/form/form-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const FormWrapper = <A, B>({

if (!isNotPartial(formData, validation)) {
// errors found
setErrors(validationArraysToStrings(validation));
setErrors(validation);
return;
}

Expand All @@ -52,7 +52,7 @@ export const FormWrapper = <A, B>({
// see https://axios-http.com/docs/handling_errors
// furhtermore we assume that then the shape returned is {[label]:error}
if ("data" in x && typeof x.data === "object") {
setErrors(x.data);
setErrors(validationArraysToStrings(x.data));
}

// tbd
Expand Down

0 comments on commit b0f5426

Please sign in to comment.