fix(mail-merge): Add check for valid email address in recipients

This commit is contained in:
Juan Tejada 2016-05-02 12:45:54 -07:00
parent 4c537cbf8e
commit 9c7ea6b73a
2 changed files with 4 additions and 1 deletions

View file

@ -91,6 +91,9 @@ class Contact extends Model
json['name'] ||= json['email']
json
isValid: ->
@email.match(RegExpUtils.emailRegex()) != null
# Public: Returns true if the contact is the current user, false otherwise.
# You should use this method instead of comparing the user's email address to
# the account email, since it is case-insensitive and future-proof.

@ -1 +1 @@
Subproject commit c62ed6110a8c161c838188019c8d33273a129c50
Subproject commit 6db7b64bf05a59c2ab7f66b032065d17ebc82a5c