Form validation with vanilla JS

Solution retrospective
I'm most proud of implementing custom form validation messages using the Constraint Validation API. It was a great learning experience to enhance user feedback in a clean and accessible way. Next time, I'd like to try building the entire form validation logic from scratch — without relying on the built-in browser validation — to deepen my understanding of form behavior and JavaScript control flow.
What challenges did you encounter, and how did you overcome them?One of the biggest challenges was implementing custom validation messages. It required more code and logic than I expected to get everything working smoothly. To overcome this, I read the Client-side form validation article on MDN, experimented with the examples, and kept testing until I finally got it working. It was very rewarding to see it all come together!
What specific areas of your project would you like help with?I'm interested in feedback on:
JavaScript structure and logic: Are there ways I could simplify or improve how I’ve handled form validation and DOM updates?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @nerb0
- For DOM Manipulation, it's better practice to use
id
attribute andgetElementById()
for specific single query selection. - Also, reference the
style-guide.md
file for the width of the css media queries.
- For DOM Manipulation, it's better practice to use
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