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

Announcements

News and Announcements icon
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:
  • rubin_boer Profile Picture
    4,843 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,843 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard