Last active
March 27, 2025 09:41
-
-
Save edysegura/9984108 to your computer and use it in GitHub Desktop.
How to prevent the browser from showing default HTML5 validation error message bubble?
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
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); |
Thanks
It works, thanks
<3
TY
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
works great ty