cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bolin-stratus
Continued Contributor
Continued Contributor

Complex DataCard Email Validation Dilemma

I have a canvas app with a form and I have a complex set of validation rules to enforce for emails.

 

  1. The email text field must allow multiple e-mail addresses separated by a comma and a white space (e.g., firstname.lastname@domain.com; firstname2.lastname2@domain.com).
  2. All e-mail addresses must be specific to a domain such as abc.com and ABC.com, allowing both upper case and lower case in the domain.
  3. Must handle emails copied and pasted from Outlook which produces the following format: LastName, FirstName <name@extcompany.com> which is problematic for validation.

I have a regular expression that successfully validates multiple e-mails separated by a comma and a white space:

 

^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.]+[\s.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$

 

I also have a Power App formula that validates a single e-mail and ensures a specific domain:

 

If( !IsMatch(txtEmail_3.Text, Email) || Last(Split(txtEmail_3.Text, "@")).Result = "abc.com",

 

However, trying to combine my three validation rules has been complex and I am still searching for a solution.

1 REPLY 1
bolin-stratus
Continued Contributor
Continued Contributor

Does anyone have a recommendation on this?  Any recommendations are greatly appreciated.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,063)