Skip to content

Commit

Permalink
fix: email check error due to whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
heryTz committed Sep 8, 2024
1 parent 431ca5e commit ca21739
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/(dashboard)/invoice/client/client-dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { zd } from "@/lib/zod";

export const saveClientInputSchema = zd.object({
name: zd.string().min(1),
email: zd.string().email(),
email: zd.string().trim().email(),
phone: zd.string().nullish(),
address: zd.string().min(1),
siren: zd.string().nullish(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export function ClientSave({
}, [client]);

const reset = () => {
console.log({ client });
form.reset(client ? saveClientInputSchema.parse(client) : {});
};

Expand Down

0 comments on commit ca21739

Please sign in to comment.