You’re trying to get the substring of a number, or something else, maybe undefined.
trimAll(document.getElementById(“email”).value.length)
should be
trimAll(document.getElementById(“email”)).value.length
You’re trying to get the substring of a number, or something else, maybe undefined.
trimAll(document.getElementById(“email”).value.length)
should be
trimAll(document.getElementById(“email”)).value.length