Skip to content

fix: escape dot in quoted-local-part of email regex - #56

Merged
royalpinto007 merged 1 commit into
SignalizeAI:mainfrom
Jah-yee:fix/validate-email-regex
Aug 6, 2026
Merged

fix: escape dot in quoted-local-part of email regex#56
royalpinto007 merged 1 commit into
SignalizeAI:mainfrom
Jah-yee:fix/validate-email-regex

Conversation

@Jah-yee

@Jah-yee Jah-yee commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Problem

The email validation regex in src/utils/validateEmail.ts has an unescaped dot:

|.(".+")

The . before (".+") is unescaped, acting as a wildcard character instead of a literal dot in the email's quoted-local-part.

Fix

Changed .(".+")\.(".+") to properly escape the dot.

Testing

The regex now correctly handles quoted local parts like "test."@example.com.

Fixes issue #55.

The unescaped '.' before (".+") acted as a wildcard instead of
a literal dot, causing incorrect email validation for quoted
local parts.

Fixes issue SignalizeAI#55.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Welcome, @Jah-yee, and thanks for your first pull request to SignalizeAI-Website.

A quick look at CONTRIBUTING.md covers how things are set up and run here.

I'll review this shortly. Ask anything in the thread if something is unclear.

@royalpinto007

Copy link
Copy Markdown
Contributor

Nice catch @Jah-yee, and welcome!

The unescaped . there meant the quoted-local-part branch accepted any character before the quotes, so junk like x"foo"@example.com validated. Escaping it closes that hole with no regression to real addresses.

Merging. If you found this interesting, a star on the repo is always appreciated, and there are more open issues if you want another.

@royalpinto007
royalpinto007 merged commit 4bb8bc4 into SignalizeAI:main Aug 6, 2026
4 checks passed
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

This is in, @Jah-yee. Really appreciate it.

Contributions like this are what keep SignalizeAI-Website moving.

A star on the repo would mean a lot if this project is useful to you.

Happy to see more from you whenever you have the time.

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.

2 participants