Character limit in the Textinput field

I have a TextInput field, which should be limited to uppercase letters, lowercase letters, numbers and underscores. This is the code I'm trying to use to limit characters:

restrict="\\AZ\\az\\0-9\\ \\_\\-" 

I am using MXML for this Textinput component.

Unfortunately, this does not limit the \ character, which is the last character that I would like to limit.

How to add backslash to list of restricted characters?

thanks

Stephen

+7
source share
1 answer

Actually, I found a solution in which I changed the restriction code:

restrict = "A-Za-z0-9 _ \ -"

I got all the backslashes that I thought of or used as delimiters.

Now works fine.

+7
source

All Articles