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

Can we set text input receive only English language?

I have bi-lingual users that can input both 'English' and 'Chinese'.  But in some fields, i need only Chinese text value.  How to do that, please advice.  Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Jira :

Do you want to make a textinput control can only input Chinese?

If so,the point is to use the IsMatch function. I've made a test for your reference:

1\add a text input control(TextInput1)

  • Clear it's default property
  • set it's OnChange property to

 

If(
    !IsMatch(
        Self.Text,
        "[\u4e00-\u9fa5]*"
    ),
    Notify("Please enter Chinese");
    Reset(TextInput1)
)

 

 19.gif

In addition,if you only want to input English,please try:

If(
    !IsMatch(
        Self.Text,
        "[a-zA-Z]*"
    ),
    Notify("Please enter English");
    Reset(TextInput1)
)

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @Jira :

Do you want to make a textinput control can only input Chinese?

If so,the point is to use the IsMatch function. I've made a test for your reference:

1\add a text input control(TextInput1)

  • Clear it's default property
  • set it's OnChange property to

 

If(
    !IsMatch(
        Self.Text,
        "[\u4e00-\u9fa5]*"
    ),
    Notify("Please enter Chinese");
    Reset(TextInput1)
)

 

 19.gif

In addition,if you only want to input English,please try:

If(
    !IsMatch(
        Self.Text,
        "[a-zA-Z]*"
    ),
    Notify("Please enter English");
    Reset(TextInput1)
)

Best Regards,

Bof

View solution in original post

if we want to specify only Thai input, how can I set it?  Please guide, thank you

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,630)