From 2afbe26f3540da9150e7eec8d9fdf7130579a73c Mon Sep 17 00:00:00 2001 From: Mike Keehnen Date: Mon, 27 Nov 2023 16:27:04 +0100 Subject: [PATCH] [GCOM-1234]: ConfirmEmailField helpertext as ReactNode --- .../components/CustomerFields/ConfirmEmailField.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/magento-customer/components/CustomerFields/ConfirmEmailField.tsx b/packages/magento-customer/components/CustomerFields/ConfirmEmailField.tsx index eb2a5a7995..dd28043175 100644 --- a/packages/magento-customer/components/CustomerFields/ConfirmEmailField.tsx +++ b/packages/magento-customer/components/CustomerFields/ConfirmEmailField.tsx @@ -24,7 +24,7 @@ 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={} required control={control} @@ -32,6 +32,7 @@ export function ConfirmEmailField() { validation={{ required: true, validate: (value) => value === watchNewEmail || i18n._(/* i18n */ "Emails don't match"), + pattern: emailPattern, }} />