-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confirm email - use pattern validation #6751
Conversation
…ian/support-frontend into ahe/add-confirm-email-test
Size Change: +624 B (+0.03%) Total Size: 1.89 MB ℹ️ View Unchanged
|
@@ -66,6 +77,42 @@ export function PersonalDetailsFields({ | |||
}} | |||
/> | |||
</div> | |||
{requireConfirmedEmail && !isEmailAddressReadOnly && ( | |||
<div ref={confirmEmailRef}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't put the ref on the source component, see this discussion
support-frontend/assets/pages/[countryGroupId]/checkout/components/PersonalDetailsFields.tsx
Outdated
Show resolved
Hide resolved
support-frontend/assets/pages/[countryGroupId]/checkout/components/PersonalDetailsFields.tsx
Outdated
Show resolved
Hide resolved
support-frontend/assets/pages/[countryGroupId]/checkout/components/PersonalDetailsFields.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the neater of the options, as it aligns with our other validation on the form 👍
Seen on PROD (merged by @andrewHEguardian 9 minutes and 56 seconds ago)
Sentry Release: support-client-side, support |
What are you doing in this PR?
Implement the confirm email field but using HTML form validation - a pattern regex field that updates based on whatever is in the email field.
This PR also enables it as an A/B test
Trello Card
Why are you doing this?
This is a branch off of #6742 but using a different mechanism.
Comparison of this approach (HTML validation) vs the other approach (validate in JS)
Pros:
Cons:
Slightly clunky useRefHow to test
See #6742