Skip to content

Commit

Permalink
Update form-wrapper.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb8005 authored Mar 1, 2024
1 parent ae8f007 commit 2ca0900
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 @@ -3,7 +3,7 @@ import React from "react";

import * as Validation from "@nexys/validation";
import * as T from "./type";
import { isNotPartial } from "./utils";
import { isNotPartial,clientValidationFunctionFromShape } from "./utils";

export const FormWrapper = <A, B>({
onSuccess,
Expand Down Expand Up @@ -33,7 +33,7 @@ export const FormWrapper = <A, B>({

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

Expand Down

0 comments on commit 2ca0900

Please sign in to comment.