How set Maximum Input Digit Limit, in the Entry?

How set Maximum Input Digit Limit, when typing in the Entry?
I didn’t find anything about it on the wiki or in the demo:
http://wiki.compilgames.net/doku.php/gdevelop5/objects/text_entry#text_entry_object

use the condition “compare 2 numbers”:
StrLength(TextEntry.String()) < Your Max input number

1 Like

I have tried many things, but are not working to me.
What i wish to do is set a maximum lenght to entry, and set to register only numbers or only letters.

the max length you set by the condition, i wrote above.
StrLength() returns the number of letters/numbers
i wrote StrLength(TextEntry.String()),
which means it returns the number of letters of the sting of the object “TextEntry”

as for checking, if the input is no special sign, idk if there is an elegant solution.
if you cant think of any smart solution, you´d have to check the input first and compare it with a list of forbidden characters/signs, before making the change to your text.
here, you can look up everything related to textmanipulation:
http://wiki.compilgames.net/doku.php/gdevelop5/all-features/string-instructions/reference#text_manipulation

Thanks for the help, Slash. I using the appropriate way found in your link reference, SubStr(string,number,number):

"ID: "+SubStr(Entry.String(),0,9)

Now I looking to know how to filter to input get only numbers or just letters.

First of all, SubStr () will not prevent further input.
But You can work with it if used properly.

As for string/ digit identification, i suggest using JavaScript
I found this snippet on stackoverflow:

function isLetter(str) {
  return str.length === 1 && str.match(/[a-z]/i);
}