js find :invalid inside div
var contactForm = document.getElementById('contact-form');
if (contactForm.checkValidity() == false) {
var list = contactForm.querySelectorAll(':invalid');
for (var item of list) {
item.setAttribute("style", "background-color: red;")
}
}