How can I allow only letters in text entry object?

Hi everyone,

I am new in gdevelop. I’ve started to do a game. The question I have it’s how to avoid special character and numbers when the player write their name in the game. I just look around the forum but i didnt find any answer which it can help.

At the moment, I have the code like this:

Please can anyone help me to know how to manage? Thank you in advance!

Check out the extension called “Input Validation”.

Thank you for your reply! I did it and I still lost and I have the same result :confused:

So, are you giving up? :smirk:
According to the description, it does what you need.

Somewhere in your regex statement you need something like:
var AllowRegex = /^[\ba-zA-Z\s-]$/;
if (AllowRegex.test(character)) return true;
return false;

Remove the 0-9 from it.

@Gruk , I’m working on it.

Thank you fro you replaying @timd35b , I understand the code but I dont find where in gdevelop I should put it.

I define a global variable "letter = /^[A-Za-z]/g " and called as I show in the screenshot. But it doesnt work :confused:

make your variable something like this:

you may need to remove the ‘letter =’, I am not sure.