Sign Up Form with Input Validation

Solution retrospective
My most favorite thing (and also the trickiest) was the actual form validation portion of the project. I had simple path of validating the entire form utilizing the submit
button, but then I thought about how some registration forms already validate a User's input (or lack thereof) when they click off of the input element. This is where I learned about the .addEventListener("blur")
function! The .addEventListener("blur")
function is used when the User essentially brings their "focus" away from the element, or in other words, when the User clicks out of the input field. Again, this part of the code is not really mandatory, as form validation can be done the simple way of using the submit
button. But sometimes it's just fun to try something different every once in a while!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on LilBelPepper's solution.
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