Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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


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,",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".

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (74,403)