Skip to content

Email validation added#1125

Open
SumedhaBhatta wants to merge 3 commits into
Charushi06:mainfrom
SumedhaBhatta:main
Open

Email validation added#1125
SumedhaBhatta wants to merge 3 commits into
Charushi06:mainfrom
SumedhaBhatta:main

Conversation

@SumedhaBhatta

@SumedhaBhatta SumedhaBhatta commented Jun 9, 2026

Copy link
Copy Markdown

Related Issue

Closes #1113

Summary

Made email validation code changes

Changes Made

index.html
Added validateEmail() function using regex /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/
Added email validation check in the submit handler (between the empty-fields check and password check)
Shows inline error: "Please enter a valid email address (e.g. user@example.com)"

Testing

user@example.com | ✅ accepted | ✅ accepted

notanemail | ✅ accepted | ❌ blocked
test@ | ✅ accepted | ❌ blocked
@domain.com | ✅ accepted | ❌ blocked
user@domain | ✅ accepted | ❌ blocked

Follows all checklist

Closes #1113

@SumedhaBhatta

Copy link
Copy Markdown
Author

@Charushi06 , Kindly review and merge it.

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.

feat: Email validation

1 participant