fix(SW-649): let react-hook-form do date state handling

This commit is contained in:
Chuma McPhoy
2024-10-30 13:03:23 +01:00
parent 7ed2e1d5d0
commit 8763346f9d
4 changed files with 86 additions and 86 deletions

View File

@@ -23,7 +23,7 @@ export const joinDetailsSchema = baseDetailsSchema.merge(
z.object({
join: z.literal(true),
zipCode: z.string().min(1, { message: "Zip code is required" }),
dateOfBirth: z.string(),
dateOfBirth: z.string().min(1, { message: "Date of birth is required" }),
termsAccepted: z.literal(true, {
errorMap: (err, ctx) => {
switch (err.code) {