Page 1 of 1

EditBox -> ValidationString

Posted: Wed Feb 08, 2006 19:37
by olgarry
Hello,

Can someone tell me how works the ValidationString of an EditBox.
What characters in this ValidationString validate what text?

Thanx

Re: EditBox -> ValidationString

Posted: Thu Feb 09, 2006 09:27
by CrazyEddie
Hi,

The validation string is a regular expression. If you're not familiar with RegExs then a google will help you no end there ;)

But basically, something like:

Code: Select all

".*"

will match (in the case of cegui, this means 'allow you to type') any character any number of times.

And:

Code: Select all

"[0-9]*"

Will match the digits 0 to 9 any number of times.

One caveat is that the string being entered must match the regex at all times. This means that for certain advanced possibilities you need to get creative with the regex validation string - most things can be achieved with a little work ;)

HTH

CE.