export function validateEmail(mail?: string | null): boolean { if (!mail) return false; return /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$/.test( mail ); }
adapted from:
JavaScript : email validation - w3resource