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 / Validate a Form Contro...
Power Apps
Unanswered

Validate a Form Control Card using the On Change property

(0) ShareShare
ReportReport
Posted on by 16

Is it possible to validate a field inside a Form Control using the On Change property? I would like to validate the field as a user tabs through the form rather than waiting until they click submit. How could I accomplish this?

Categories:
I have the same question (0)
  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    Hi @hnordenberg you can validate the control, check this: Power Apps Text Input Pattern Validation - @WonderLaura

  • hnordenberg Profile Picture
    16 on at

    Thanks for the reply. How do you get it to validate the card and show the error message WITHOUT hitting the submit button on the form? I want to show the error as soon as they tab away from the field (using the OnChange property)?

  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    @hnordenberg 

     

    you will do that by setting the variable on in OnChange.

     

    Consider this

    I want to notify the user if they entered a text longer than 45 characters and its not a text i expect, let's say hello.

    I will check the textinput

    Then set an info button to visible where the user can see they need to do something, this can be replaced by making the error text visible - i just prefer info buttons.

    Because i have many inputs the variable i update is a record

     

    In the textinput OnChangeUpdateContext({CheckIt:{id: 0, check: Self.Value}})

    The visibility of the info button = CheckIt.id = 0 && Len(CheckIt.check) > 4 && CheckIt.check <> "hello"

     

    Results

    error mesg info validation.gif

     

     

     

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard