We will learn to configure smart email address validation for email in Power Apps / Dynamics 365. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Platform.
Understanding email column in Power Apps
In Power Apps, the columns define the individual data items that can be used to store information in a table. You can create new columns to capture data when existing standard tables don’t have columns that meet your requirements. Power Apps supports multiple types of column as shown below.
|Power Apps data type||Solution Explorer type||API type|
|Big Integer||Time Stamp|
|Date and Time||Date and Time|
Date and Time Format
|Date Only||Date and Time|
Date Only Format
|Decimal Number||Decimal Number|
|Single Line of Text|
|Floating Point Number||Floating Point Number|
|Multiline Text||Multiple Lines of Text|
|Phone||Single Line of Text|
|Status Reason||Status Reason|
|Text||Single Line of Text|
|Text Area||Single Line of Text|
Text Area Format
|Ticker Symbol||Single Line of Text|
Ticker Symbol Format
Time Zone Format
|Unique Identifier||Unique Identifier or Primary Key|
|URL||Single Line of Text|
|Whole Number||Whole Number|
The column with type “Email” forcefully enables the attribute / column to hold the data within an email format as shown below. In the below example, the Power Apps will display an error notification if the data present in an email column is not according to the pre-defined email format (email@example.com).
Valid email address format :-A valid email address consists of an email prefix and an email domain, both in acceptable formats.
The prefix appears to the left of the @ symbol.
The domain appears to the right of the @ symbol.
For example, in the address firstname.lastname@example.org, “example” is the email prefix, and “mail.com” is the email domain.
What is email address validation for email in Power Apps?
We can now get email address columns validated automatically in model-driven apps with no-code. With smart email address column validation, the developers or makers can build smarter and contextually aware next-gen apps for their workflows with better data quality.
Earlier, the existing email column type had only basic email validation where the prefix & suffice were validated as shown above. With smart email address column validation, the email column format comes with better validation that includes reasons for the column being invalid. Any model-driven apps using a text column with email format receives automatic validation, which is helpful in guiding users to enter better email data.
Validation parameters for the new smart email address validation –
- Emails that bounce back: This is an address that can’t receive a message for any reason other than being expired.
- Test or spam email addresses. An address that contains known indicators of a test or spam address in the email header or metadata, IP address, HTML code of the email, and email content and formatting.
- Expired email addresses: This is an email account that has expired and can no longer receive or send email.
- Incorrect syntax: For example, an address that doesn’t contain both a username and an email domain.
- Disposable domain: An address that contains a known disposable or temporary email domain.
Important Notes : –1. Smart email validation currently only works for model-driven apps.
2. Smart email validation shows validation issues but won’t block users from saving their record.
How to enable the smart email address validation in Power Apps?
- Navigate to your Power Apps solution portal, make sure the model-driven app has a table with a text data type column formatted for email, such as the Email column for the contact table.
- In the app designer, select Settings on the command bar. Select the Upcoming tab, and then select Enable Smart Email Address Validation Control.
- Click on save & publish once the configurations are completed.
Test smart email address validation in Power Apps
- Once the smart email address validation is configured, navigate back to the app designer & select “Play” on the command bar.
- Open a form that has the email column, such as the Email column for the dataverse table.
- Enter an invalid email address, such as a domain that doesn’t exist, such as email@example.com, in the Email Address column as shown below.
- Here you can see the different UI error / warning messages shown by Power Apps for an input email address.