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 / Formatting Text Field ...
Power Apps
Answered

Formatting Text Field with numbers and letters

(0) ShareShare
ReportReport
Posted on by 7

A simple solution but I cant find it anywhere.

I have a text input named postal code that must contain both numbers and letters and the format should be "### ###" for the user to proceed. I want to apply the condition on a label to show if the format is incorrect. I know how to do it for numbers or text only, but not both.

 

Thanks for the help in advance!

Categories:
I have the same question (0)
  • Verified answer
    Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @abubakrkhanaka ,

    Validation checking can be achieved using Regex for Matching purpose.

    You can use a label as such to check out if this is acceptable for your requirement. 

    Text property of Label

    If(IsMatch(TextInput.Text, "^([a-zA-Z0-9]+ )([a-zA-Z0-9]+)*$") && Len(TextInput.Text) = 7, "Valid", "Invalid")

     

    (Note: TextInput is the field where input will be entered and label will check, you can use the code for anywhere as per convenience)

     

    Hope this helps

  • abubakrkhanaka Profile Picture
    7 on at

    @Ethan_R It really worked. Thanks alot for the help. Cheers!

  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Great. Accept the reply as solution so other people having similar requirement can get the solution faster. 

  • abubakrkhanaka Profile Picture
    7 on at

    @Ethan_R  Done 😊

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