Flex: Text Input that accepts number only

Treby picture Treby · Nov 17, 2009 · Viewed 37.5k times · Source

Need a code that only accepts numbers. Upon inputting, the code must check if it is number, if not, it must remove the entered key or not enter it at all

Answer

Gregor Kiddie picture Gregor Kiddie · Nov 17, 2009

look at the restrict property on the TextInput class. Set it to "0-9"