Skip to content

Commit

Permalink
fix the amount validation while creating an expense
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvarajsai committed Jan 6, 2025
1 parent 9302a32 commit 4d0a6ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const expenseFormSchema = z
],
{ required_error: 'amountRequired' },
)
.refine((amount) => amount != 1, 'amountNotZero')
.refine((amount) => amount != 0, 'amountNotZero')
.refine((amount) => amount <= 10_000_000_00, 'amountTenMillion'),
paidBy: z.string({ required_error: 'paidByRequired' }),
paidFor: z
Expand Down

0 comments on commit 4d0a6ff

Please sign in to comment.