BEM, JS

Solution retrospective
Hello everyone! did js validation, but it didn't quite work out. I can not find information on how to remove the message about incorrect validation. I used createElement in which I added various validation error messages and added this element via cloneNode. I understand that each time a field is validated, the invalid message should be removed, but I can't figure out how to do it. deleting a clone via remove () fails. And the error messages are multiplying! It could have been made easier by adding the error text right away in DOM and showing it by adding a class or display. I will be grateful for advice or a link to an article with a solution!
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Pavel Drow’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