Jump to content

allow certain characters to be entered


Varkis

Recommended Posts

Posted (edited)

How can I make it so that only English letters and numbers can be entered in the guiCreateEdit field?

Edited by Egor_Varaksa
Posted

Hello Egor_Varaksa,

I suggest you try playing around with the onClientGUIChanged event. Use the guiGetText function to fetch the current content of the editbox. If the current text contains any invalid characters then reset it to the previous text. You should try using the utf8.find function to check for validity of the text. Basically, if the entire content matches against your pattern (start index = 1, end index = #content) then it does match your language requirements.

Posted

Do I need to create a table with forbidden characters? If so, it will take a long time. Is it possible, on the contrary, to create a table with only allowed characters?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...