Created
February 14, 2015 12:21
-
-
Save byverdu/537ce369c6590c5ed484 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
// deshabilitar el actual comportamiento | |
form.addEventListener('invalid', function(event) { | |
event.preventDefault(); | |
}, true); | |
// Support Safari and Android browser | |
form.addEventListener('submit', function(event) { | |
if (!this.checkValidity()) { | |
event.preventDefault(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment