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 / Textinput should not b...
Power Apps
Unanswered

Textinput should not be empty or should not contain special characters in gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a time sheet application where in I'm trying to control text input behaviour where i need to check if comment(TextInput) section is empty i should not save time sheet higlighted fields are text inpputs in gallery need these field to be mandatory then only it shoud allow to submit 

PowerrangerM_0-1673959179479.png

 

 

Categories:
  • Sanshubh Profile Picture
    512 on at

    Hello @Anonymous 

     

    For TextInput validation you can use IsMatch Function from this Link Here:
    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-ismatch 

     

    write the validation code on one errormassage label Like this

     

    If(IsBlank(TextInput1.Text),"Enter Value in TextInput1",!IsMatch(TextInput1.Text, "[a-zA-Z0-9-]"),"Please Enter Proper Value in TextInput1")

     

    and this code on visible property of errormassage label

     

    If(IsBlank(TextInput1.Text) || !IsMatch(TextInput1.Text, "[a-zA-Z0-9 ]"),true,false)

     


    To disable and enable the submit button write this code on Display Mode property of submit button

     

    If(ErrorMsg.Visible,DisplayMode.Disable,DisplayMode.Edit)

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the reply @SanshubhLubal  however i want it across rows this will not work ,and my submit button is outside of gallery .

  • Sanshubh Profile Picture
    512 on at

    I don't get it.
    Across the rows??

  • BideyYusuf Profile Picture
    387 on at

    Hi @Anonymous what @SanshubhLubal explained will work for you, at the point when you are creating the record (When you select NEW form)

     

    But when you said across row, do you mean, you have a gallery that works like Excel??... is that what you have? 

     

    please elaborate, so that we can understand how to help you further.

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard