mirror of
https://github.com/spliit-app/spliit.git
synced 2026-03-05 20:26:11 +01:00
Fix the amount validation while creating an expense (#291)
This commit is contained in:
@@ -52,7 +52,7 @@ export const expenseFormSchema = z
|
|||||||
],
|
],
|
||||||
{ required_error: 'amountRequired' },
|
{ required_error: 'amountRequired' },
|
||||||
)
|
)
|
||||||
.refine((amount) => amount != 1, 'amountNotZero')
|
.refine((amount) => amount != 0, 'amountNotZero')
|
||||||
.refine((amount) => amount <= 10_000_000_00, 'amountTenMillion'),
|
.refine((amount) => amount <= 10_000_000_00, 'amountTenMillion'),
|
||||||
paidBy: z.string({ required_error: 'paidByRequired' }),
|
paidBy: z.string({ required_error: 'paidByRequired' }),
|
||||||
paidFor: z
|
paidFor: z
|
||||||
|
|||||||
Reference in New Issue
Block a user