Skip to content

Commit

Permalink
adding rule for 20 char max for additional gender (#2071)
Browse files Browse the repository at this point in the history
  • Loading branch information
hclarkEnq authored Dec 6, 2024
1 parent 3403369 commit ab8a78f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ export const SexAndBirthEntryFields = ({ orientation = 'horizontal' }: SexAndBir
<Controller
control={control}
name="birthAndSex.additionalGender"
render={({ field: { onChange, onBlur, value, name } }) => (
rules={maxLengthRule(20)}
render={({ field: { onChange, onBlur, value, name }, fieldState: { error } }) => (
<Input
label="Additional gender"
orientation={orientation}
Expand All @@ -144,6 +145,7 @@ export const SexAndBirthEntryFields = ({ orientation = 'horizontal' }: SexAndBir
name={name}
htmlFor={name}
defaultValue={value}
error={error?.message}
/>
)}
/>
Expand Down

0 comments on commit ab8a78f

Please sign in to comment.