Skip to content

Commit

Permalink
fix: Enforce firstName and lastName lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
amattu2 committed Nov 8, 2024
1 parent 5378f55 commit 21a2ffd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/content/users/ProfileView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ const ProfileView: FC<Props> = ({ _id, viewType }: Props) => {
<StyledLabel id="firstNameLabel">First name</StyledLabel>
{visibleFieldState.includes(fieldset.firstName) ? (
<StyledTextField
{...register("firstName", { required: true })}
{...register("firstName", { required: true, maxLength: 30 })}
inputProps={{ "aria-labelledby": "firstNameLabel", maxLength: 30 }}
size="small"
inputProps={{ "aria-labelledby": "firstNameLabel" }}
required
/>
) : (
Expand All @@ -396,10 +396,10 @@ const ProfileView: FC<Props> = ({ _id, viewType }: Props) => {
<StyledLabel id="lastNameLabel">Last name</StyledLabel>
{visibleFieldState.includes(fieldset.lastName) ? (
<StyledTextField
{...register("lastName", { required: true })}
{...register("lastName", { required: true, maxLength: 30 })}
inputProps={{ "aria-labelledby": "lastNameLabel", maxLength: 30 }}
size="small"
required
inputProps={{ "aria-labelledby": "lastNameLabel" }}
/>
) : (
user.lastName
Expand Down

0 comments on commit 21a2ffd

Please sign in to comment.