Allow & in e-mail addresses

release-0.6
thomascube 19 years ago
parent 4aaddb32e1
commit bf39ad587b

@ -269,7 +269,7 @@ function rcube_check_email(input, inline)
{ {
if (input && window.RegExp) if (input && window.RegExp)
{ {
var reg_str = '([a-z0-9][-a-z0-9\.\+_]*)\@(([-a-z0-9][\.]?)*[a-z0-9]\.[a-z]{2,9})'; var reg_str = '([a-z0-9][-a-z0-9\.\+_&]*)\@(([-a-z0-9][\.]?)*[a-z0-9]\.[a-z]{2,9})';
var reg1 = inline ? new RegExp(reg_str, 'i') : new RegExp('^'+reg_str+'$', 'i'); var reg1 = inline ? new RegExp(reg_str, 'i') : new RegExp('^'+reg_str+'$', 'i');
var reg2 = /[\._\-]{2}/; var reg2 = /[\._\-]{2}/;
return reg1.test(input) && !reg2.test(input) ? true : false; return reg1.test(input) && !reg2.test(input) ? true : false;

Loading…
Cancel
Save