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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,161)