Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

News Letter Sign-up with success message

khalagai 300

@khalagai

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

Form validation using JS.

What challenges did you encounter, and how did you overcome them?

Regex expression to check email. The one I have used is simple.

What specific areas of your project would you like help with?

Any tips on a more robust regex expression will be much appreciated.

Community feedback

@Shakil-a

Posted

Good job on the solution Khalagai!,

On the point of the regex pattern, this is one i found online: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/g

  • Correct Characters: Only allows characters that are usually in email addresses.
  • Proper Endings: Makes sure the email ends with something like ".com".
  • Correct Format: Prevents wrong characters and checks both parts of the email to be correct.

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord