Restricting the character entry into the TextInput

We were struggling from last several days about how to restrict some special character entry into TextInput field. We tried applying our own logic for implementing this functionality by tracking the keydown event and checking the ascill/regular expression but did not succeeded into this.

Finally I thought to look into the help and suprisingly we find that TextInput has restrict property to which we can supply the range of character that the TextInput should accept.

<mx:TextInput x=”104″ y=”151″ width=”190″ id=”charInput” restrict=”a-z A-Z”/>

Complex problem always has very simple solution 🙂

Advertisements

One Response to Restricting the character entry into the TextInput

  1. Ved says:

    Thank you again! =)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: