cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PremSagar
Level: Powered On

Text Field accept only alphabetic characters

Hai all,

 

I want a text field to accept only Alphabetical characters (ex: wytetryuewdbhgd) but no numbers or any special charaters.

 

If numbers or Special characters entered, then error should be displayed

 

Any help please?

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Text Field accept only alphabetic characters

Hi @PremSagar 

 

set the "Visible" property of your Error label to the below expression:
 
If(IsMatch(TextInput4.Text,MultipleLetters) || IsBlank(TextInput4.Text),false,true)
 
Here, TextInput4 refers to the TextInput control.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Super User
Super User

Re: Text Field accept only alphabetic characters

Hi @PremSagar 

 

Currently PowerApps supports only two text formats, TextFormat.Text which allows alphabets/Numbers and special characters, other is TextFormat.umber, which only allows Number input. 
 
In case you want to allow only AlphaNumeric characters, then you can set an error message visibility on the basis of formula:
 If(IsMatch(TextInput4.Text,"^[a-zA-Z0-9]*$") || IsBlank(TextInput4.Text),false,true)
Hope this Helps!
3 REPLIES 3
Super User
Super User

Re: Text Field accept only alphabetic characters

Hi @PremSagar 

 

set the "Visible" property of your Error label to the below expression:
 
If(IsMatch(TextInput4.Text,MultipleLetters) || IsBlank(TextInput4.Text),false,true)
 
Here, TextInput4 refers to the TextInput control.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
PremSagar
Level: Powered On

Re: Text Field accept only alphabetic characters

Hai @yashag2255 ,

 

Thank you! is there a way, where i can restrict my text field to accept only aplhanumeric? (it should not accept if i typoe any other character)

 

Thanks

Super User
Super User

Re: Text Field accept only alphabetic characters

Hi @PremSagar 

 

Currently PowerApps supports only two text formats, TextFormat.Text which allows alphabets/Numbers and special characters, other is TextFormat.umber, which only allows Number input. 
 
In case you want to allow only AlphaNumeric characters, then you can set an error message visibility on the basis of formula:
 If(IsMatch(TextInput4.Text,"^[a-zA-Z0-9]*$") || IsBlank(TextInput4.Text),false,true)
Hope this Helps!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 50 members 4,278 guests
Please welcome our newest community members: