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 Apps
Unanswered

undefined

(0) ShareShare
ReportReport
Posted on by 17
  • ,In a form I ,there is a text input field in that field user are able to enter numbers only,if they enter alphabets and special characters the text input will become red,if they enter number it will in default white colour.

 

I tried this validation in fill property of text input If(IsMatch(Datacardvalue.text,Match.MultipleDigits),RGBA(255,255,255,1),RGBA(255,85,85,0.5))

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

     

    If(IsNumeric(Self.Text),Color.White,Color.Red)

     

  • New_1 Profile Picture
    17 on at

    Hi@TheRobRush sorry I forgot to mention one requirement that in textinput "AT" must be always there apart from AT only numbers must be allowed,if we type alphabets and special characters the text input box should turn into red,if they entered numbers it will be in normal white colour, kindly help me with this ,

    I tried this validation If(IsMatch (Dataacardvalue.text,"A"&"T"&Match.MultipleDigits), colour.white, colour.red)

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Is "AT" just randomly.places somehwere in the string or is it the beginning or end etc.

  • New_1 Profile Picture
    17 on at

    AT is in the beginning and it is autopopulated after AT only numbers is allowed apart from that if we enter anything textbox must turn red colour if there is no error it will in default colour @TheRobRush 

  • TheRobRush Profile Picture
    11,128 Moderator on at

    If AT is always in first 2 positions, and can never be added again mid or at end of string then this will sufffice

    If(IsNumeric(Replace(Self.Text,1,2,Blank())),Color.White,Color.Red)

     

    If for some reason there may ever be a change to where something is in front of it or theres at 2x etc then 

    If(IsNumeric(Substitute(Self.Text,"AT",Blank())),Color.White,Color.Red)

     

    would be used

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard