Skip to content

Fix: Add email validation to newsletter subscription #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 20, 2020
Merged

Fix: Add email validation to newsletter subscription #113

merged 2 commits into from
Nov 20, 2020

Conversation

jordanmcdougall
Copy link

@jordanmcdougall jordanmcdougall commented Nov 19, 2020

Description

Added a regular expression which validates the syntax of a valid email address on click of the Subscribe Now.

Fixes #106

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested against the following email addresses for valid addresses:

Tested against the following email addresses for invalid addresses:

  • email
  • @example.com
  • email @example.com
  • email@ example.com
  • email@example .com
  • email@example.com

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

jmcdougall added 2 commits November 19, 2020 15:09
add subscribe class to button that can be used by main.js to validate email address
function to ensure the email address is valid when subscribing to the newsletter
@lakshyatyagi24 lakshyatyagi24 merged commit 3e01130 into StudentCode-in:master Nov 20, 2020
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.

Fix Newsletter subscribing even if valid email is not entered
2 participants