summaryrefslogtreecommitdiff
path: root/public_html/js
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-12-03 17:27:35 (GMT)
committerTorsten Grote <grote@kolabsys.com>2012-12-03 17:27:35 (GMT)
commit891426465906702760012839e72f65fb17ce85ea (patch)
tree382a048c5e007f32a41f649e9b24dc21e1ab1ba6 /public_html/js
parent91bd0911172f2fb549db8b9430a02c9e5ed89def (diff)
downloadkolab-wap-891426465906702760012839e72f65fb17ce85ea.tar.gz
don't validate email address with JavaScript
Diffstat (limited to 'public_html/js')
-rw-r--r--public_html/js/kolab_hosted.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/public_html/js/kolab_hosted.js b/public_html/js/kolab_hosted.js
index aa4ab81..6fdb43e 100644
--- a/public_html/js/kolab_hosted.js
+++ b/public_html/js/kolab_hosted.js
@@ -26,13 +26,6 @@ kadm.user_save = function(reload, section)
{
var data = kadm.serialize_form('#'+this.env.form_id);
- // check email address
- if(typeof data.mailalternateaddress != 'undefined' && !isValidEmailAddress(data.mailalternateaddress)) {
- kadm.display_message('signup.wrongmailalternateaddress', 'error');
- kadm.form_value_error('mailalternateaddress');
- return;
- }
-
if (!kadm.check_required_fields(data)) {
kadm.display_message('form.required.empty', 'error');
return;
@@ -121,7 +114,7 @@ function password_match()
}
}
-// TODO use form.validate api call for that
+// this is only used to update GUI only when it makes sense, for real validation we rely on form_value.validate
function isValidEmailAddress(emailAddress) {
var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);
return pattern.test(emailAddress);