Basic HTML, CSS and JS, with JS form validation. Mobile first workflow

Solution retrospective
I had some challenges on this with the styles associated with form validation. My solution was to complete the validation in JS and to add or remove classes to elements based on that validation to give the right appearance.
Is this good practice or is there a simpler way to do this?
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on James'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