45
Views
5
Comments
Solved
How can i allow English characters and arabic characters in input text field?
Application Type
Reactive

How can i allow only letters ( English characters and arabic characters) in input text field?

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello

Added the updated code for list

Now we need to use query selector all and we just need to assign a class to our input

Sample - https://personal-ejuytnht.outsystemscloud.com/TestApp/PATTERN?_ts=638518093155109420

Thanks
Tousif Khan

TestApp_Regex-2_Updated.oml
2023-10-21 19-42-11
Tousif Khan
Champion

Hello,
You can do it by adding a regex for it you can create a pattern and basis on it you can return the result.
Pattern: /^[a-zA-Z\u0600-\u06FF\s]*$/
I tried it with a pattern hope it will work for you.
https://personal-ejuytnht.outsystemscloud.com/TestApp/PATTERN?_ts=638517788015737510
Thanks
Tousif Khan

TestApp_Regex.oml
2023-06-21 08-58-47
Andrew Mahfouz 

in my case i have input inside list so i can not get the id for this input 

how can i get the id for input 

TestApp_Regex.oml
2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello

Added the updated code for list

Now we need to use query selector all and we just need to assign a class to our input

Sample - https://personal-ejuytnht.outsystemscloud.com/TestApp/PATTERN?_ts=638518093155109420

Thanks
Tousif Khan

TestApp_Regex-2_Updated.oml
2024-11-05 11-28-22
Sunil Rajput

Hii, Andrew Mahfouz 

You can use this js solve this issue, 

if( (event.charCode > 64 && event.charCode < 91) || (event.charCode > 96 && event.charCode < 123)){}else{    event.preventDefault()}

I have share OML you can check it.

Screen name - Home details and 

formvalidate.oml
2023-06-21 08-58-47
Andrew Mahfouz 

hello

i need English characters and arabic characters  

this solution for English only

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.