Limit what characters can be captured by text entry object

Would be extremely useful if we could simply set what characters can be captured by a text entry object.

Only letters “Abcd”
Only small letters “abcd” (in case any capital letter is entered, format it to small)
Only capital letters “ABCD” (in case any small letter is entered, format it to capital)
Only whole numbers “1234” (decimal value “.” just can not be entered)
Only decimal numbers “1.0” (in case whole number entered just add “.0” to make it decimal)
Only special characters and operators “.,:;±=”
Any characters “Abcd1234.5.,:;±=,” (pretty much just like now)
Also would be nice if we could limit the number of characters can be captured by the text entry object.
In case we could just cherry picking and combine any of the options as we need, letters and numbers only or capital letters and number only…etc would be a dream.

It would be practical in case we want to limit what kind of characters allowed in case we want the player to enter only number or only letters or only a special character, max 5 characters, only small or only capital…etc

For example the problem I’m facing right now:
I’m about to give the player the option to customize the controls but, in case I enter a capital letter it doesn’t work and obviously if I enter multiple characters it also break it. It must be a single small letter entered by the player.
I’m also about to add other options require to enter whole number, obviously the player need to enter whole numbers only.

Instead of going through all kind of trouble and string and error checking and fixing to make sure the player don’t break the game with the characters entered it would be extremely useful if we could just simply limit what can be captured by the text entry object at least to allow numbers only or letters only or any character.

Thanks :slight_smile:

1 Like

+1 :laughing:

+1

But how about languages that don’t have uppercase/lowercase letters?

By the way, there already are string expressions to convert a string to lowercase or uppercase (for the characters that have those available).

In that case I guess these options are going to be simply not useful and has no effect :wink:

Yes, but it would be just nice to simply tell the text entry object, whatever is entered store it in memory as lowercase or uppercase string :slight_smile: