Created
August 20, 2016 01:44
-
-
Save Tomasz-Silpion/4f0c8bbab85127554cddc199b3f25ef9 to your computer and use it in GitHub Desktop.
Prototype.js Magento value trim (replace spaces) on email validation
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
$$('.validate-email').each(function(input){ | |
input.observe('change', function(e){ | |
this.value = this.value.replace(/^\s+|\s+$/g,""); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment