Skip to content
Submitted about 2 years ago

Sign Up Form with Input Validation

accessibility
LVL 1
@ItsBelp
A solution to the Intro component with sign-up form challenge

Solution retrospective


What are you most proud of, and what would you do differently next time?

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!

Code
Loading...

Please log in to post a comment

Log in

Community 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