validate the phone number

This commit is contained in:
Matteo Manzinello 2020-07-10 12:51:58 +02:00
parent 76e7ddcd30
commit c0d13a39c7
1 changed files with 4 additions and 1 deletions

View File

@ -482,6 +482,9 @@ const mailgoRender = (type = MAIL_TYPE, mailgo: HTMLLinkElement): void => {
msg = mailgo.getAttribute("data-msg");
}
// validate the phone number
if (!validateTel(tel)) return;
// information
// let titleEl = getE("m-tel-title");
@ -882,7 +885,7 @@ const validateEmails = (arr: string[]): boolean => arr.every(validateEmail);
// validate a single tel with regex
const validateTel = (tel: string): boolean => {
// TODO
// TODO: find a good regex for telephone numbers
return true;
};