Skip to content

Commit

Permalink
[GCOM-1234]: ConfirmEmailField helpertext as ReactNode
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekeehnen committed Nov 27, 2023
1 parent 39f3e02 commit 2afbe26
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ export function ConfirmEmailField() {
type='text'
autoComplete='off'
error={formState.isSubmitted && !!formState.errors.confirmEmail}
helperText={formState.isSubmitted && formState.errors.confirmEmail?.message}
helperText={formState.isSubmitted && <>{formState.errors.confirmEmail?.message}</>}
label={<Trans id='Confirm new email' />}
required
control={control}
name='confirmEmail'
validation={{
required: true,
validate: (value) => value === watchNewEmail || i18n._(/* i18n */ "Emails don't match"),
pattern: emailPattern,
}}
/>
</FormRow>
Expand Down

0 comments on commit 2afbe26

Please sign in to comment.