Created
March 17, 2019 12:12
-
-
Save indatawetrust/386df387750279dc5ccdf35dc1839147 to your computer and use it in GitHub Desktop.
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
Array.from(document.querySelectorAll('[message]')).forEach(function(el) { | |
el.setAttribute('oninvalid', 'this.setCustomValidity("' + el.getAttribute('message') + '")'); | |
el.setAttribute('oninput', 'this.setCustomValidity("")') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment