Allow players to only type numbers

Hey !

I have a textinput and I would like players to only be able to type digits 1 2 3 4 5 6 7 8 9 0 nothing else !
How can I achieve this ? Thanks a lot !

Hi falsuss,

I don’t believe this is possible with the current default expressions. You will most likely need to create your own string expression that passes though what is typed to a RegEX filter to make sure only 0-9 is typed.

A good example of how this can be done is in arthuro555’s P2P project. He has a custom sanitize function that strips out everything other then letters and numbers.

1 Like

I’ll give it a try, thanks for the answer and sorry for the late reply Oo

Use the text input control, and select ‘Number’ as it’s type :