Design comparison
Solution retrospective
I'm really proud that the Javascript was actually quite easy! I had some trouble getting the form to work, but at some point it mostly clicked on my own.
What challenges did you encounter, and how did you overcome them?PROTIP: don't use larger scaling when designing your CSS. I did and then it looked wrong when I uploaded it to Github, making me redo a lot of the things today. Other than that, getting the form to work perfectly was a pain at first, but ultimately doable.
What specific areas of your project would you like help with?Any feedback regarding JS would be immensely helpful!
Community feedback
- @kodan96Posted 6 months ago
hi there! ๐
Instead of creating an array, pushing value to the array and updating the error message depending on that value you can just create the HTML element with the text, hide it with
display: none;
in CSS and toggle it when the input fields value doesn't get through the validation.Also you're not validating the email, you just check if there a '@' in it. Mostly email validation is done with
JS regular expression
and thetest
method.Hope this was helpful ๐ Good luck and happy coding! ๐ช
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin 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