Skip to content

fix(business): require domain suffix in email validation#51

Open
emre155 wants to merge 1 commit into
marandaneto:mainfrom
emre155:fix/email-validation-domain-suffix-issue-29
Open

fix(business): require domain suffix in email validation#51
emre155 wants to merge 1 commit into
marandaneto:mainfrom
emre155:fix/email-validation-domain-suffix-issue-29

Conversation

@emre155

@emre155 emre155 commented Jul 18, 2026

Copy link
Copy Markdown

Summary

Fixes the email validation logic to reject addresses missing a domain suffix (closes #29).

Changes

  • Updated the regex inside isValidEmail in src/business.js from /^\S+@\S+$/ to /^\S+@\S+\.\S+$/.
  • This ensures a dot (.) is present after the domain portion (e.g. rejecting person@example).

All related tests now pass cleanly.

Signed-off-by: emreumar emreumar@users.noreply.github.com

Updates isValidEmail to use the regular expression /^\S+@\S+\.\S+$/
to ensure that email addresses must contain a dot (domain suffix)
after the @ sign (e.g. rejecting 'person@example').

Closes marandaneto#29

Signed-off-by: emreumar <emreumar@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 18, 2026 10:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Email validation accepts missing domain suffix

3 participants