Last active
July 9, 2017 16:48
-
-
Save Omar-Gonzalez/bc492c3c933b019e5967f9a4558062d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isValidInput(e, mustContain){ | |
"use strict"; | |
if (e.target.tagName === "INPUT"){ | |
if (e.target.value.length === mustContain){ | |
document.getElementById("submit").disabled = false; | |
}else{ | |
document.getElementById("submit").disabled = true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment