summaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
authorMichael Hunteman <michael@huntm.net>2024-07-10 17:43:59 -0700
committerMichael Hunteman <michael@huntm.net>2024-07-10 17:43:59 -0700
commit145bf9aeedb88ded671b1f1b4700235379a11143 (patch)
treeb86fb7429002ac28637a4984db0a0ced64bf8851 /client/src
parenta67743780f98ea9163cd2dddd20ef34be84bc68a (diff)
Trim whitespace
Diffstat (limited to 'client/src')
-rw-r--r--client/src/components/RsvpForm.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/components/RsvpForm.tsx b/client/src/components/RsvpForm.tsx
index d981053..4454c77 100644
--- a/client/src/components/RsvpForm.tsx
+++ b/client/src/components/RsvpForm.tsx
@@ -131,6 +131,7 @@ function RsvpForm() {
helperText={errors.email?.message}
required
{...register('email', {
+ setValueAs: (value: string) => value.trim(),
required: 'This field is required',
pattern: {
value: /\S+@\S+\.\S+/,
@@ -191,6 +192,7 @@ function RsvpForm() {
helperText={errors.partyList?.[index]?.firstName?.message}
required
{...register(`partyList.${index}.firstName`, {
+ setValueAs: (value: string) => value.trim(),
required: 'This field is required',
})}
/>
@@ -204,6 +206,7 @@ function RsvpForm() {
helperText={errors.partyList?.[index]?.lastName?.message}
required
{...register(`partyList.${index}.lastName`, {
+ setValueAs: (value: string) => value.trim(),
required: 'This field is required',
})}
/>