Skip to content

fix: add email validation in Stay Updated newsletter form - #729

Open
durgesh274 wants to merge 1 commit into
Jaishree2310:mainfrom
durgesh274:fix/email-validation-stay-updated
Open

fix: add email validation in Stay Updated newsletter form#729
durgesh274 wants to merge 1 commit into
Jaishree2310:mainfrom
durgesh274:fix/email-validation-stay-updated

Conversation

@durgesh274

Copy link
Copy Markdown
Contributor

Description

This PR fixes #631

Added email validation to the Stay Updated newsletter form in Footer.tsx. Previously, the form accepted any input (plain text, numbers, special characters) without any validation. Now users must enter a properly formatted email address before subscribing.

Notes for Reviewers

  • Added isValidEmail regex validation function in the handleSubmit handler in Footer.tsx
  • Added emailError state to store and display the validation error message
  • Error message renders inline when invalid email is entered
  • Error clears automatically as the user starts typing again
  • Used noValidate on the form to disable browser's default validation popup and rely on custom error message instead
  • Also fixed a pre-existingreact/no-unescaped-entities error on line 147 (You'reYou're)

@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@durgesh274 is attempting to deploy a commit to the jaishree2310's projects Team on Vercel.

A member of the Team first needs to authorize 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.

BUG: "Stay Updated" email field accepts invalid input, no email validation

1 participant