diff --git a/src/app/(dashboard)/invoice/client/client-dto.ts b/src/app/(dashboard)/invoice/client/client-dto.ts index 6261512..6d51cd0 100644 --- a/src/app/(dashboard)/invoice/client/client-dto.ts +++ b/src/app/(dashboard)/invoice/client/client-dto.ts @@ -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(), diff --git a/src/app/(dashboard)/invoice/client/components/client-save.tsx b/src/app/(dashboard)/invoice/client/components/client-save.tsx index f770fde..756f543 100644 --- a/src/app/(dashboard)/invoice/client/components/client-save.tsx +++ b/src/app/(dashboard)/invoice/client/components/client-save.tsx @@ -37,7 +37,6 @@ export function ClientSave({ }, [client]); const reset = () => { - console.log({ client }); form.reset(client ? saveClientInputSchema.parse(client) : {}); };