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

Responsive sign up form with grid and flex

Martin 220

@martinw0

Desktop design screenshot for the Intro component with sign-up form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I think think my JS can be a lot reduce. I saw there is some html built-in functionnality to validate form. Is there a way to manage better the error message and the validation process ? Is the form tag needed in the case we are using js to manage the form ? I added min length in HTML and I thought the validity property will take it in account in JS but it doesn't detect empty field. Do you know why ?

Community feedback

@Phses

Posted

Hey Martin! Congrats on completing this challenge!

  • I think that you can use just one preventdefault in the event listener of submit to reduce the code.

  • In my solution i didn't use any html functionality, i use only js and regex to validate the form and my solution got much bigger than yours. Its nice see how the same challenge can be done in different ways.

Happy coding!!

Marked as helpful

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