diff options
| author | mihna123 <mihailonvojinovic@gmail.com> | 2026-05-24 18:36:43 +0200 |
|---|---|---|
| committer | mihna123 <mihailonvojinovic@gmail.com> | 2026-05-24 18:36:43 +0200 |
| commit | a147d3966538fa0c30cc85fa6152e1bea6180b34 (patch) | |
| tree | 86f60799afeede72a9082ef545a2a989d574504c /src/models/invoice.ts | |
| parent | 66f5dc201b676864304b94950867dedb27ebdbc7 (diff) | |
| download | invoice-a147d3966538fa0c30cc85fa6152e1bea6180b34.tar.gz invoice-a147d3966538fa0c30cc85fa6152e1bea6180b34.zip | |
feat: update invoice model with minimum rate and amount for line items
Diffstat (limited to 'src/models/invoice.ts')
| -rw-r--r-- | src/models/invoice.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/models/invoice.ts b/src/models/invoice.ts index 39d5d67..7905e4d 100644 --- a/src/models/invoice.ts +++ b/src/models/invoice.ts @@ -4,8 +4,8 @@ export const CurrencyEnum = z.enum(['USD', 'EUR', 'RSD']); export const LineItemSchema = z.object({ description: z.string(), - quantity: z.number(), - rate: z.number(), + quantity: z.number().min(0, "Quantity can't be less than 0"), + rate: z.number().min(0, "Rate can't be less than 0"), }); const optionalDate = z.preprocess((v) => { |
