Skip to content

Instantly share code, notes, and snippets.

@Omar-Gonzalez
Last active July 9, 2017 16:48
Show Gist options
  • Save Omar-Gonzalez/bc492c3c933b019e5967f9a4558062d9 to your computer and use it in GitHub Desktop.
Save Omar-Gonzalez/bc492c3c933b019e5967f9a4558062d9 to your computer and use it in GitHub Desktop.
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