cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

ismatch???

I need to verify that the length of the input text is between 5-120 characters and cannot contain special characters

How can i do

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi@ppp345678,

Based on the issue that you mentioned, do you want to validate characters length and special characters?

Could you please share a bit more about the scenario, do you have something language requirement, English, Chines or anything else?

I have a test on my side, please take a try as below:

IsMatch(TextInput2.Text,"^[\u4E00-\u9FA5A-Za-z0-9]{5,120}$")

Note: I assume that you use either English or Chinese.

Hope it could help.

Best Regards,

Qi

View solution in original post

2 REPLIES 2
Super User III
Super User III

You can use the Fill Property of the Textbox as:

If(IsMatch( TextInput1.Text,
"(?!^[0-9]\*$)(?!^[a-zA-Z]\*$)([a-zA-Z0-9]{5,120})" ),Green,Red)
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Community Support
Community Support

Hi@ppp345678,

Based on the issue that you mentioned, do you want to validate characters length and special characters?

Could you please share a bit more about the scenario, do you have something language requirement, English, Chines or anything else?

I have a test on my side, please take a try as below:

IsMatch(TextInput2.Text,"^[\u4E00-\u9FA5A-Za-z0-9]{5,120}$")

Note: I assume that you use either English or Chinese.

Hope it could help.

Best Regards,

Qi

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (67,921)