Everything works fine if I use the attribute "value".
document.getElementById("email").value = "Email already exists."
But when I try to use an attribute that has a hypen "-" on it, it doesn't work anymore
document.getElementById("email").data-error = "Email already exists."
I've tried variations like ['data-error']
or ."data-error" but I can't seem to find the right syntax.