mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 11:55:24 +00:00
Fixed email validation
Monotone-Parent: 2e5131b1c08c6c88775f6c14a90fafed85109af8 Monotone-Revision: 0c9dd83dd8ccf4f99590b84d0154f2fdc166550f Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-22T20:36:28 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -80,21 +80,25 @@ function copyContact(type, email, uid, sn,
|
||||
};
|
||||
|
||||
function validateContactEditor() {
|
||||
var e;
|
||||
var rc = true;
|
||||
|
||||
e = $('workMail');
|
||||
if (e.value.length == 0)
|
||||
return true;
|
||||
if (uixEmailRegex.test(e.value) != true)
|
||||
return confirm(labels.invalidemailwarn);
|
||||
var e = $('workMail');
|
||||
if (e.value.length > 0
|
||||
&& !uixEmailRegex.test(e.value))
|
||||
{
|
||||
alert(getLabel ("invalidemailwarn"));
|
||||
rc = false;
|
||||
}
|
||||
|
||||
e = $('homeMail');
|
||||
if (e.value.length == 0)
|
||||
return true;
|
||||
if (uixEmailRegex.test(e.value) != true)
|
||||
return confirm(labels.invalidemailwarn);
|
||||
if (e.value.length > 0
|
||||
&& !uixEmailRegex.test(e.value))
|
||||
{
|
||||
alert(getLabel ("invalidemailwarn"));
|
||||
rc = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return rc;
|
||||
}
|
||||
|
||||
function showCoords(node) {
|
||||
|
||||
Reference in New Issue
Block a user