mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
[cleanup] validate_email_add
This commit is contained in:
@@ -38,8 +38,7 @@ class Lead(SellingController):
|
||||
frappe.throw(_("Campaign Name is required"))
|
||||
|
||||
if self.email_id:
|
||||
if not validate_email_add(self.email_id):
|
||||
frappe.throw(_('{0} is not a valid email id').format(self.email_id))
|
||||
validate_email_add(self.email_id, True)
|
||||
|
||||
if self.email_id == self.lead_owner:
|
||||
# Lead Owner cannot be same as the Lead
|
||||
|
||||
@@ -62,8 +62,7 @@ def add_subscribers(name, email_list):
|
||||
count = 0
|
||||
for email in email_list.replace(",", "\n").split("\n"):
|
||||
email = email.strip()
|
||||
if not validate_email_add(email):
|
||||
frappe.throw(_("Invalid Email '{0}'").format(email))
|
||||
validate_email_add(email, True)
|
||||
|
||||
if email:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user