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).
Once the app has been created successfully, rename the screen if needed.
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.
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")
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)
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
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}))
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);
Click save and publish.
Run the application. The output page seems like the below screenshot.