diff options
Diffstat (limited to 'client/src/components/GuestLogin.tsx')
-rw-r--r-- | client/src/components/GuestLogin.tsx | 10 |
1 files changed, 8 insertions, 2 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 |