aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/schemas.ts
diff options
context:
space:
mode:
authorChris Johnston <christopher_johnston@me.com>2024-01-08 19:26:44 +0000
committerGitHub <noreply@github.com>2024-01-08 14:26:44 -0500
commitbec1dd270a1d3184ea13f0b849f192176354fc00 (patch)
treeebb50246aad6c0562ae892d1729c4eda94ad6ffd /src/lib/schemas.ts
parent4566900f9cfcc837e56c590c9344d09a4bc50820 (diff)
Add Expense Date (#26)
* add expense date * Improve date formatting * Prettier * Change field description --------- Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
Diffstat (limited to 'src/lib/schemas.ts')
-rw-r--r--src/lib/schemas.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts
index 9b7d428..14b253c 100644
--- a/src/lib/schemas.ts
+++ b/src/lib/schemas.ts
@@ -41,6 +41,7 @@ export type GroupFormValues = z.infer<typeof groupFormSchema>
export const expenseFormSchema = z
.object({
+ expenseDate: z.coerce.date(),
title: z
.string({ required_error: 'Please enter a title.' })
.min(2, 'Enter at least two characters.'),