I have a text input for email addresses and the user can provide a single email or multiple emails separated by a semicolon. I need to validate the email(s) to match 1 of 2 domains (abc.com or def.com). My issue is that the code below works great, but how do I accomplish this validation for multiple emails separated by a semicolon?
// WORKS - Validate email text input as 1) Valid email, 2) Whitelist ABC & DEF domains
If(IsMatch(TextInput1.Text,
"^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$"
) And
Last(Split(TextInput1.Text, "@")).Result
in ["abc.com", "def.com"]
,
Notify("Email IS valid", NotificationType.Success),
Notify("Email not valid", NotificationType.Error)
)