Repository navigation
[CS-1425] Validate email format using URI::MailTo::EMAIL_REGEXP - #40
Merged
Merged
Conversation
Add URI::MailTo::EMAIL_REGEXP validation to the exceptional? method to catch invalid email formats early, preventing Mail::Address from mangling emails with unquoted comments or spaces in the local part. Uses mail_address.address for the regex check (not to_s) to support subclasses like DisplayNameEmailAddress that format to_s differently. - Emails like 'john(comment)@example.com' are now marked exceptional - Properly quoted display names like 'John Doe <john@example.com>' still work - Database no longer receives corrupted email addresses Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
draganfabijan
force-pushed
the
DEV-1425-1
branch
from
January 27, 2026 00:37
53738eb to
2094e72
Compare
richardchou-nexl
approved these changes
Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add URI::MailTo::EMAIL_REGEXP validation to the exceptional? method to catch invalid email formats early, preventing Mail::Address from mangling emails with unquoted comments or spaces in the local part.
Ticket: https://nex-level.atlassian.net/browse/CS-1425
The issue: