diff --git a/ui/src/components/application/ApplicationChat.vue b/ui/src/components/application/ApplicationChat.vue index fb8f8bf..1d6b352 100644 --- a/ui/src/components/application/ApplicationChat.vue +++ b/ui/src/components/application/ApplicationChat.vue @@ -64,7 +64,7 @@ function onSubmit(values: { text: string }, { resetForm }: { resetForm: () => vo
- +
diff --git a/ui/src/components/application/ApplicationForm.vue b/ui/src/components/application/ApplicationForm.vue index 574c330..5384e0c 100644 --- a/ui/src/components/application/ApplicationForm.vue +++ b/ui/src/components/application/ApplicationForm.vue @@ -33,7 +33,7 @@ const regexB = /^https?:\/\/steamcommunity\.com\/profiles\/\d+\/?$/; const formSchema = toTypedSchema(z.object({ dob: z.string().refine(v => v, { message: "A date of birth is required." }), name: z.string().nonempty(), - playtime: z.coerce.number({ invalid_type_error: "Must be a number", }).min(0, "Cannot be less than 0"), + playtime: z.preprocess((v) => (v === "" ? undefined : String(v)),z.string({ required_error: "Required" }).regex(/^\d+(\.\d+)?$/, "Must be a number").transform(Number).refine((n) => n >= 0, "Cannot be less than 0")), hobbies: z.string().nonempty(), military: z.boolean(), communities: z.string().nonempty(), diff --git a/ui/src/pages/Application.vue b/ui/src/pages/Application.vue index b32b1ea..428d52c 100644 --- a/ui/src/pages/Application.vue +++ b/ui/src/pages/Application.vue @@ -125,7 +125,7 @@ async function handleDeny(id) {