validateEmail and validateTel as options
This commit is contained in:
parent
241817cfd4
commit
c9dc4edb39
@ -434,12 +434,17 @@ const mailgoRender = (type = MAIL_TYPE, mailgo: HTMLLinkElement): void => {
|
|||||||
bodyMail = mailgo.getAttribute("data-body");
|
bodyMail = mailgo.getAttribute("data-body");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
typeof config?.validateEmail === "undefined" ||
|
||||||
|
config?.validateEmail === true
|
||||||
|
) {
|
||||||
// validate the email address
|
// validate the email address
|
||||||
if (!validateEmails(mail.split(","))) return;
|
if (!validateEmails(mail.split(","))) return;
|
||||||
|
|
||||||
// if cc, bcc is not valid cc, bcc = ""
|
// if cc, bcc are not valid cc, bcc = ""
|
||||||
if (cc && !validateEmails(cc.split(","))) cc = "";
|
if (cc && !validateEmails(cc.split(","))) cc = "";
|
||||||
if (bcc && !validateEmails(bcc.split(","))) bcc = "";
|
if (bcc && !validateEmails(bcc.split(","))) bcc = "";
|
||||||
|
}
|
||||||
|
|
||||||
// the title of the modal (email address)
|
// the title of the modal (email address)
|
||||||
title.innerHTML = mail.split(",").join("<br/>");
|
title.innerHTML = mail.split(",").join("<br/>");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user