I'm using the Really easy field validation with prototype by Andrew Tetlaw at https://github.com/atetlaw/Really-Easy-Field-Validation
But for some reason, on my form that I'm using this on, Yahoo email addresses seem to completely fail validation. But, gmail addresses go right on through. Any ideas as to why?
The validate-email section is pretty straight forward, as far as I can tell, in my js/prototype/validation.js file:
['validate-email', 'Please enter a valid email address. For example johndoe@domain.com.', function (v) {
//return Validation.get('IsEmpty').test(v) || /\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(v)
//return Validation.get('IsEmpty').test(v) || /^[\!\#$%\*/?|\^\{\}`~&\'\+\-=_a-z0-9][\!\#$%\*/?|\^\{\}`~&\'\+\-=_a-z0-9\.]{1,30}[\!\#$%\*/?|\^\{\}`~&\'\+\-=_a-z0-9]@([a-z0-9_-]{1,30}\.){1,5}[a-z]{2,4}$/i.test(v)
return Validation.get('IsEmpty').test(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v)
}]
Then, in my phtml (Magento) I'm running the validation on this input field:
<input name="dealerapp[email]" id="dealerapp:email" title="<?php echo Mage::helper('contacts')->__('Email') ?>" class="input-text validate-email required-entry" type="email" autocapitalize="off" autocorrect="off" spellcheck="false" />
But, like I said, for some reason, Yahoo email addresses don't submit at all. No error messages, nothing in the Google Chrome Dev console, nothing to indicate why they don't go through.
Any ideas, lads?