Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Prototype.js Magento value trim (replace spaces) on email validation
$$('.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
You can’t perform that action at this time.