summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hunteman <michael@mac-mini.local>2025-01-17 15:38:38 -0600
committerMichael Hunteman <michael@mac-mini.local>2025-01-17 15:38:38 -0600
commit00a9fc7b2d20eeacbd957fef47685fdfdb5d606f (patch)
treeb43974f5334f8c23d78baf369bf8e1cc78d0db12
parent6aaefb2fb7179428b31e4781cfaff5b6067a78e8 (diff)
Fix radio group format
-rw-r--r--client/src/components/GuestLogin.tsx10
-rw-r--r--client/src/components/RsvpForm.tsx2
2 files changed, 9 insertions, 3 deletions
diff --git a/client/src/components/GuestLogin.tsx b/client/src/components/GuestLogin.tsx
index c2bfeb9..c0eace1 100644
--- a/client/src/components/GuestLogin.tsx
+++ b/client/src/components/GuestLogin.tsx
@@ -84,7 +84,10 @@ function GuestLogin() {
error={!!errors.firstName}
helperText={errors.firstName?.message}
required
- {...register('firstName', { required: 'This field is required' })}
+ {...register('firstName', {
+ setValueAs: (value: string) => value.trim(),
+ required: 'This field is required',
+ })}
/>
<TextField
label="Last Name"
@@ -94,7 +97,10 @@ function GuestLogin() {
error={!!errors.lastName}
helperText={errors.lastName?.message}
required
- {...register('lastName', { required: 'This field is required' })}
+ {...register('lastName', {
+ setValueAs: (value: string) => value.trim(),
+ required: 'This field is required',
+ })}
/>
<Button type="submit" variant="contained" fullWidth sx={{ mt: 2 }}>
Log in
diff --git a/client/src/components/RsvpForm.tsx b/client/src/components/RsvpForm.tsx
index f25dfcd..a754be5 100644
--- a/client/src/components/RsvpForm.tsx
+++ b/client/src/components/RsvpForm.tsx
@@ -136,7 +136,7 @@ function RsvpForm() {
error={!!errors.attendance}
required
>
- Attendance
+ Attend?
</FormLabel>
<Controller
name="attendance"