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

Vite, React, TailwindCSS and React Icons

@Adufe-Obanijesu

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

Community feedback

RaidEyes 390

@RaidEyes

Posted

Hi there, I guess this is your first project here right? Well done! However, I find that there are some minor mistakes you need to consider:

  1. Your email <input> doesn't have a validation. Which means that the user can type whatever they want in the input and the form can still be submitted. Here you should use JS (yourInput).validity.valid to check if the user is typing correctly, the output of this is true or false:
  • If the validation is true => errorMessage.innerHTML = ""
  • If the validation is false => errorMessage.innerHTML = "Invalid email address"
  1. The complete message doesn't show the user's email, it only shows the default input of your HTML, try get the user input with innerHTML.

Happy coding!

0

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