Skip to content

Instantly share code, notes, and snippets.

@AndrewHuffman
Created June 19, 2017 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewHuffman/41af3b76819e1d7985824fc5a944f578 to your computer and use it in GitHub Desktop.
Save AndrewHuffman/41af3b76819e1d7985824fc5a944f578 to your computer and use it in GitHub Desktop.
{
name: function validateName(elm) {
var name = elm.value;
if (name.length < 2) {
producePrompt('Name is required', 'name-error', 'red')
return false;
}
producePrompt('Valid', 'name-error', 'green');
return true;
},
phone: function validatePhone(elm) {
// validate phone
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment