How can I prevent the browser from showing the default HTML validation error message bubble?
document.addEventListener('invalid', (function() {
return function(e) {
//prevent the browser from showing default error bubble / hint
e.preventDefault();
// optionally fire off some custom validation handler
// myValidation();
};
})(), true);