Email validation not working  - Bootstrap Entity Data from Excel
Application Type
Traditional Web, Mobile
Service Studio Version
11.10.13 (Build 39571)

Email validation not working while import Bootstrap Entity Data from Excel

Capture.PNG

mvp_badge
MVP

Hi Akhil,


As you've seen the Email data type does not enforce validations on the database level.

You can however very easily do this check using Regex and checking against the pattern ^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$

There is a component called Regex How-To which showcases how to use Regex and includes the most common patterns like this one, like in the image below:



Then you just only need to apply the check on your bootstrap to validate the email coming from the excel.


Hope it helps.


Kind Regards,
João

mvp_badge
MVP

Hi Akhil,

Another solution is to define a check branch(IF node) in the data bootstrap action flow before the logic to create recrod in the respective DB table.

In the conditional check refer to the in-built email address validation function i.e. EmailAddressValidate(EmailAddress) as shown below.

Code Snippet:

EmailAddressValidate(ConvertFromExcel.Current.Excel_Employee.Email)

Hope this helps you!


Kind regards,

Benjith Sam

Thank you for your response.

I thought OutSystem will automatically validate the input fields from excel. 


Thanks
Akhil

mvp_badge
MVP

You're welcome, Akhil :)

As per my observation and understanding, the platform won't by default validate the bootstrap email address value mapped with the entity attribute of email data type. Instead, you will have to explicitly define the logic to validate the bootstraped email address value either by regex validation (covers advance/complex level validation) as stated by João or by using the in-built email address validation function (basic level validation).

In case of Form submission, the email address input value validation is handled by default as shown below.

i.e. In HTML5, using <input type="email"> defines a field for an e-mail address. The input value is automatically validated to ensure it is a properly formatted e-mail address.


Hope this helps you!


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.