Responsive and accessible contact form with validation

Solution retrospective
I'm really happy with how my validation solution turned out, even though I'm not entirely sure it follows standard practices. I spent a lot of time going through the JS Fundamentals learning path articles on forms and kept coming back to the MDN client-side validation guide. Tried to keep the implementation as straightforward as possible while still being effective. Next time around, I'd definitely look into using a validation library instead of rolling my own solution from scratch.
What challenges did you encounter, and how did you overcome them?The biggest challenge was figuring out how to display the right error messages for each input field. My solution was creating a Map that connects input elements to their error message elements, which made it much easier to show the correct validation feedback. This approach ended up working really well and kept the code organized.
What specific areas of your project would you like help with?I'd appreciate input on whether my form validation approach follows standard practices, or if there are better patterns I should be using. Specifically interested in feedback on the Map-based approach for handling input-to-error-message relationships.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Kyle Mulqueen'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