summaryrefslogtreecommitdiff
path: root/web-ui/app
diff options
context:
space:
mode:
authorPatrick Maia <patrickjourdanmaia@gmail.com>2014-12-11 19:10:44 +0000
committerPatrick Maia <patrickjourdanmaia@gmail.com>2014-12-12 16:20:29 +0000
commita0318266427bcb8c1f00f82f9afab9e444d8d2f4 (patch)
tree7ab35e12083369a343bedaae148e2b3003b0d560 /web-ui/app
parent5b539c61f559ec45287f6911d82f13dbbcae4552 (diff)
Revert "Card #168 - does not accept obviously invalid email addresses"
This reverts commit b636c1d8c3c4fe86f08a141d6009603163597059.
Diffstat (limited to 'web-ui/app')
-rw-r--r--web-ui/app/js/mail_view/ui/recipients/recipients_input.js7
1 files changed, 1 insertions, 6 deletions
diff --git a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js
index ef860eb0..c1c32d77 100644
--- a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js
+++ b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js
@@ -111,18 +111,13 @@ define([
var value = (data && data.value) || this.$node.val();
var that = this;
_.each(value.split(/[,;]/), function(address) {
- if(that.isValidEmailAddress(address.trim())) {
+ if (!_.isEmpty(address.trim())) {
that.trigger(that.$node, events.ui.recipients.entered, { name: that.attr.name, address: address.trim() });
}
});
reset(this.$node);
};
- this.isValidEmailAddress = function(address) {
- // valid emails are in the format: 'user@domain.smt' or 'User <user@domain.smt>'
- return /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}|[A-Z ]+<[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}>$/i.test(address);
- };
-
this.init = function () {
this.$node.typeahead({
hint: true,