Created
May 12, 2019 07:41
-
-
Save bartcis/46568bdf0a30aec498277d3eb3db40e0 to your computer and use it in GitHub Desktop.
Pseudo code for form validation
This file contains hidden or 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
formInput.addEventListener('focus', () => { | |
if (formInput.valid) { | |
// Validaton - value correct | |
} else { | |
// Validaton - value incorrect | |
} | |
}); | |
submitButton.addEventListener('click', (event) => { | |
event.preventDefault(); | |
// Validation | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment