Skip to content
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

[Feat] #976

Open
5 tasks done
Abdus-8747 opened this issue Oct 26, 2024 · 6 comments
Open
5 tasks done

[Feat] #976

Abdus-8747 opened this issue Oct 26, 2024 · 6 comments
Labels
enhancement New feature or request isn't me pending question Further information is requested

Comments

@Abdus-8747
Copy link

Description

Issue Title: Add Email Validation to Newsletter Subscription Form with Stylish Alert

Description: Currently, the email input in the newsletter subscription section allows any text input.

We need to enhance the user experience by:

Ensuring the input field accepts only valid email addresses.
Displaying a cool and visually appealing alert message when the "Subscribe" button is clicked:
If the email format is valid, show a success message.
If the email format is invalid, prompt the user to enter a valid email address.
Acceptance Criteria:

The email field should validate the format of the input using a regular expression.
When the "Subscribe" button is clicked:
If the email is valid, display a stylish success alert (e.g., with custom colors, icons, and animations).
If the email is invalid, display a stylish error alert (e.g., with appropriate colors and icons to indicate an error).
Suggested Implementation:

Add an id attribute to the email input field and the subscribe button.

Use JavaScript to validate the email input.

Use CSS to design visually appealing alerts.

Screenshots

Screenshot (16)

Checklist

  • I have checked the existing issues
  • I have read the Contributing Guidelines
  • I'm a GSSoC'24-Extd contributor
  • I'm a Hacktoberfest'24 contributor
  • I am willing to work on this issue (optional)
@Abdus-8747 Abdus-8747 added the enhancement New feature or request label Oct 26, 2024
Copy link

Hello Abdus-8747! Thanks for opening an issue in Ezyshop! 🚀

  • We'll get back to you as soon as possible.

  • Hope you star our Repo.

  • Join our Discord Server to collaborate and discuss further.

@mdazfar2
Copy link
Owner

Hey @Abdus-8747, you want it so that when a user enters an email, only valid emails will be fetched, right? And for invalid emails, a popup alert message should appear? If I'm correct, please let me know, or describe in detail what exactly you mean.

Also, tell me one thing, Abdus: how are you fetching so many valid emails? Is there any API or library that can fetch unlimited emails for free? We aren't using any paid service.

@mdazfar2 mdazfar2 added question Further information is requested pending isn't me labels Oct 26, 2024
@Abdus-8747
Copy link
Author

Hey @mdazfar2 first of all thank you for your response,

Yes, you're correct!
I want to make sure that only valid emails
(with use of @ and .)are accepted when a user enters an email, and if an invalid email is entered, a popup alert should notify the user immediately. The main goal is to prevent any wrong formatted email in the system and enhance user experience.

And I am exited to work with you as it's first time for me as a beginner.

@mdazfar2
Copy link
Owner

@Abdus-8747, I’m not only talking about fetching "@"—I mean whether there is any free service available for fetching emails. If not, then using a non-existent email like (e.g., [email protected]) is not ideal, so let's leave that aside.

Can you implement the newsletter functionality so that when a user enters their name and email and clicks the subscribe button, they receive an email from Ezyshop? Additionally, can the user details be stored in my MongoDB database to track subscriptions? If a user tries to subscribe again with an already registered email, a popup should appear saying, Already subscribed to our newsletter. Let me know if you can implement this.


Checkout the below demo video for better understand 👇


2024-10-26.21-46-20.mp4

@Abdus-8747
Copy link
Author

@mdazfar2 Bro actually i am just a begginer and dont have much knowledge of Mongo Db and Data bases......so i might not be right fit for this task

@mdazfar2
Copy link
Owner

No problem @Abdus-8747.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request isn't me pending question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants