Skip to content

Instantly share code, notes, and snippets.

@brockallen
Last active December 17, 2015 17:09
Show Gist options
  • Save brockallen/5644060 to your computer and use it in GitHub Desktop.
Save brockallen/5644060 to your computer and use it in GitHub Desktop.
Preventing the browser validation message
$('#myForm input').on('invalid', function(e) {
e.preventDefault();
var msg = e.target.validationMessage;
// Display msg here...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment