Skip to content

fix(customer): Fix email validation and add tests #3847

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

Open
wants to merge 2 commits into
base: fix-customer-email
Choose a base branch
from

Conversation

groyoh
Copy link
Contributor

@groyoh groyoh commented Jun 18, 2025

Context

Our current email validation regex is too permissive, allowing invalid emails like test [email protected]. This caused some invoice email send-out failures.

Description

The main issue comes from the fact that our regex does not have \A and \z anchors, which means it can match parts of a string rather than the whole string.

@groyoh groyoh changed the title fix(email): Fix email validation regex and add tests fix(customer): Fix email validation regex and add tests Jun 18, 2025
@groyoh groyoh changed the title fix(customer): Fix email validation regex and add tests fix(customer): Fix email validation and add tests Jun 18, 2025
@groyoh groyoh changed the base branch from main to fix-customer-email June 19, 2025 07:29
Our current email validation regex is too permissive, allowing invalid emails like `test [email protected]`. This caused some invoice emails sendout failures.

The main issue comes from the fact that our regex does not have `\A` and `\z` anchors, which means it can match parts of a string rather than the whole string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant