Design comparison
Community feedback
- @jacksonwhitingPosted over 1 year ago
I just took a look at your code. Nice job with the validation.
It looks like you used javascript to generate all your error messages and error message classes.
I like to minimize the amount of javascript I have to write and load because it can be expensive to a website.
Did you consider adding the messages in the HTML and then writing a function to hide or display the message based on validation. Same with the CSS classes.
Here's my solution, let me know what you think...
https://jw-credit-card-details-form.netlify.app/
0@AdiiksPosted over 1 year ago@jacksonwhiting Hi, thanks for feedback. I wanted to dynamically create a messages based on validation error. That gives me the possibility to implement other messages if I would want that without creating a lot of paragraphs for every kind of message.
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