Skip to content

Commit

Permalink
transaction schema updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume_Bernier committed Apr 26, 2024
1 parent d439a95 commit c0491f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/src/routes/(app)/admin/transactions/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ export const formSchema = z.object({
return file ? allowedFileTypes.includes(file.type) : true;
}, {
message: "Only JPEG, PDF, and PNG files are allowed.",
}),
}).optional(),
type: z.enum(['revenue', 'expense']),
date: z.string(),
currency: z.string(),
date: z.string()
.min(1, "Date is required."),
currency: z.enum(['usd', 'cad']),
amount: z.number()
.positive("Amount must be a positive number.")
.min(0.01, "Amount must be at least 0.01 USD.")
Expand Down

0 comments on commit c0491f4

Please sign in to comment.