Responsive sign up form with grid and flex

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 ?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Phses
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 -
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