added fix for Bug #695 to email-validation

This commit is contained in:
Mark Schmale 2010-12-13 15:48:36 +01:00
parent 4cc62ffaca
commit 9a873aa760

View file

@ -20,8 +20,8 @@ var Validation = {
} }
}, },
emailKeypress: function(evt) { emailKeypress: function(evt) {
if(evt.charCode === 0) { return; } if(evt.keyCode === 0) { return; }
if(!Validation.rules.email.characters.test(this.value + String.fromCharCode(evt.charCode))) { if(!Validation.rules.email.characters.test(this.value + String.fromCharCode(evt.keyCode))) {
$('#user_email').css('border-color', '#8B0000'); $('#user_email').css('border-color', '#8B0000');
} else { } else {
$('#user_email').css('border-color', '#666666'); $('#user_email').css('border-color', '#666666');