Build Forms Validation in Power Apps

Introduction

In this article, I have explained how to create a  form and how to validate the form using power apps.

Once you successfully logged into the app tenant, choose the new app option, click canvas app, and provide the required details like (App name, Description, etc).

Forms Validation in Power apps

Forms Validation in Power apps

Forms Validation in Power apps

Once the app has been created successfully, rename the screen if needed.

Forms Validation in Power apps

Forms Validation in Power apps

Forms Validation in Power apps

The form was created successfully. Now give validation, and submit the form based on your requirements.

The Cross icon validates that the box should not be empty.

Forms Validation in Power apps

Then insert the cross Icon and write the function to validate the form data in the table.

Update the expression in the icon ToolTip mode.

If(!IsBlank(DataCardValue9.Text), "", "The Field can not be blank")

Forms Validation in Power apps

Then insert the label and write the function to validate the message of the form data in the table.

Update the expression in the icon Text mode. Visibility must be true.

If(IsMatch(DataCardValue3.Text,Match.Digit,MatchOptions.Contains),"“Possible Data Validation Error – Click Validate to Check”",false,true)

Forms Validation in Power apps

Then insert the field like the total. It should be auto calculate, and write the function for auto calculate the form data in the table.

Update the expression in the icon Default mode.

DataCardValue9+DataCardValue10+DataCardValue11

Forms Validation in Power apps

Then insert the validate button and write the function to validate the form data in the table.

Update the expression in the Icon Onslectmode.

If(IsMatch(DataCardValue3.Text,Match.Digit,MatchOptions.Contains),UpdateContext({submit:true}),UpdateContext({submit:false}))

Forms Validation in Power apps

Then insert the save icon and write the function for saving the form data in the table.

Update the expression in the Icon Onslect mode.

SubmitForm(Form2);

Forms Validation in Power apps

Click save and publish.

Run the application. The output page seems like the below screenshot.

Forms Validation in Power apps

Forms Validation in Power apps


Similar Articles