web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Managing Validation Ru...
Power Apps
Unanswered

Managing Validation Rules and On Submit Validation in SharePoint Online Power App

(1) ShareShare
ReportReport
Posted on by 42

Hi,

I am trying to find info on how to

  • construct validation rules on text fields,
  • display error messages with an asterisk on those fields and make the border of the offending field red
  • Finally, I want to prevent the submission of the form if any of the field validation rules are violated (the submission button is built into the SharePoint Form, so I believe the Global Validation is managed in the On Submit) .   

I see that each Data card has a "Star Visible", and "Error Message" labels and that there is a border color that could possibly be updated with an if statement...

 

  1. I have a text field, "Office Phone Number" where I want it to match the pattern "(xxx) xxx-xxxx" ( I believe the if statement should be: If(IsMatch(OfficePhoneNumber_DataCard1_1.text, LeftParen & Digit & Digit & Digit & RightParen & Space & Digit & Digit & Digit & Hyphen & Digit & Digit & Digit & Digit), but I don't know where this should go to effect the notifications for that field)
  2. I have a text field "Email" where I want it match an email pattern. (I believe that If-statement should be "If(IsMatch(EmailDataCard.Text,"joan@contoso.com,Email)" Same issue, I don't know where to place this...
  3. Some fields that cannot be blank. (If(IsBlank(SomeFieldsDataCard.Text,...,...)
  4. Some fields that cannot be blank if a toggle is set to "true".
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard