Design comparison
Solution retrospective
Wow, this one was really challenging! I really enjoyed writing the Javascript that validated the fields and tried to make 1 function that would fit all. I think I should've created something that could be reused on form submit, but I think I managed to MacGyver it relatively painlessly. It could be a bit more DRY but I certainly did my best!
Community feedback
- @fazzaamiarsoPosted almost 2 years ago
Hi Rachel! Nice work! It's definitely not easy!
You could use Constraint Validation API to validate, which combine native html attributes and javascript. Please take a look at my solution using it for the details.
I hope it helps! Cheers!
Marked as helpful0@rachelktyjohnsonPosted almost 2 years ago@fazzaamiarso Thanks for that! I definitely didn't think of the Constraint Validation API (didn't know it was a thing haha). I will definitely take that into consideration next time I have a project that involves form validation.
Thanks again!
0
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