javascript substring is not a function – check your variable content

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

Leave a Reply

Your email address will not be published. Required fields are marked *