Update get-gov.js

This commit is contained in:
zandercymatics 2024-01-18 12:45:39 -07:00
parent ac81ecd11a
commit 4c5d8b2c55
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -264,7 +264,6 @@ function removeFormErrors(input){
let errorMessage = document.getElementById(`${input.id}__error-message`);
if (errorMessage) {
errorMessage.remove();
console.log("Error message removed")
}else{
return
}
@ -274,6 +273,7 @@ function removeFormErrors(input){
input.classList.remove('usa-input--error');
}
// Get the form label
let label = document.querySelector(`label[for="${input.id}"]`);
if (label) {
label.classList.remove('usa-label--error');