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 / Power Apps validation ...
Power Apps
Answered

Power Apps validation failure

(0) ShareShare
ReportReport
Posted on by 41

I have a field Supplier Email, I have applied validation there to enter user only correct email but even user enters the wrong id (shows red because of validation failure) they are able to submit it.

Now my requirement is - until user enters the correct email they shouldn't able to submit the form. How can I achieve this? Which field property should I use to achieve this ?

I have used the IsMatch formula on color,border color, on change property but it still shows red or green color based on validation. But it never stop the user to enter it correctly and stop the form submission.

Categories:
I have the same question (0)
  • MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 on at

    @KumarGaurav  are you using an form? If it is, you can use the SubmitForm(). This method always call the validation and trigger OnFailure to apply some actions;

    Michaelfp_1-1718821714990.png

     


    And you have on the form the property Valid that show if is valid or not.

    Michaelfp_0-1718821699797.png


    If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as solution ✔️. This is help the community.

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @KumarGaurav ,

    You need to simply reference an attribute of the control where you already have the validation - example

    If(
     YourTextBox.BorderColor = Color.Red,
     Notify(
     "Email not valid - please correct",
     NotificationType.Error
     ),
     SubmitForm(YourFormName)
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • KumarGaurav Profile Picture
    41 on at

    Hi @WarrenBelz you mean to apply the above validation formula on the submit button ? If yes , then suppose if we have multiple field validation in place then we need to include the formula for all of them ?

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    Hi @KumarGaurav ,

    Yes for this particular validation. For required fields, you can use FormName.Valid, however I have found this not to be consistently reliable.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • KumarGaurav Profile Picture
    41 on at

    Also when I use notificationtype.error function it throws an error

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @KumarGaurav ,

    It is valid code for a Notify() command. How are you using it (code in Text please)

  • KumarGaurav Profile Picture
    41 on at

    @WarrenBelz can you send me the complete code how you want me to use ? Notification.error is giving output as a number 0 or 1 , 

     

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @KumarGaurav ,

    It is correct in the format that I posted. If you post (in Text) exactly what you are getting the error on, I can look at it.

  • KumarGaurav Profile Picture
    41 on at

    I also want to create a testing environment for my app, where If required I can change the code and all so there should not be any impact on production form, how to do that ?

    I am using the backend as SP list so do I need to create a new list on SP for testing environment ? 

  • KumarGaurav Profile Picture
    41 on at

    @WarrenBelz Now I see notification is coming while entering the data but the thing is that even I enter the data which is not as per validation. System accept and submit it. 

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard