Design comparison
Solution retrospective
PLease i need comments on this solution because i added some extra features there.
Community feedback
- @vjaimesPosted over 1 year ago
This is very good, though I think the code you have can be shortened. your inputs share a class so you can use querySelectAll to get all of them and then filter them by id whenever you need to validate them. A similar approach can be done for your error messages using "id" or the "data" attribute.
This is only my perspective though. I understand we all have our own coding styles so take this with a hint of salt. this is the approach I took, so feel free to look at my code whenever you want to :D
Marked as helpful0@BrandaoAPosted over 1 year ago@vjaimes thanks for going through my work. I actually tried the method You talked about but i had a little bit of difficulties trying to do some validations that's why i decided to go the longer way. but i'll try it 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