Packagefeathers.utils.text
Classpublic class TextInputRestrict
InheritanceTextInputRestrict Inheritance Object

Duplicates the functionality of the restrict property on flash.text.TextField.

See also

Full description of flash.text.TextField.restrict in Adobe's Flash Platform API Reference


Public Properties
 PropertyDefined By
  restrict : String
Indicates the set of characters that a user can input.
TextInputRestrict
Public Methods
 MethodDefined By
  
TextInputRestrict(restrict:String = null)
Constructor.
TextInputRestrict
  
filterText(value:String):String
Accepts a string of characters and filters out characters that are not allowed.
TextInputRestrict
  
isCharacterAllowed(charCode:int):Boolean
Accepts a character code and determines if it is allowed or not.
TextInputRestrict
Property Detail
restrictproperty
restrict:String

Indicates the set of characters that a user can input.

In the following example, the text is restricted to numbers:

object.restrict = "0-9";

The default value is null.


Implementation
    public function get restrict():String
    public function set restrict(value:String):void

See also

Constructor Detail
TextInputRestrict()Constructor
public function TextInputRestrict(restrict:String = null)

Constructor.

Parameters
restrict:String (default = null)
Method Detail
filterText()method
public function filterText(value:String):String

Accepts a string of characters and filters out characters that are not allowed.

Parameters

value:String

Returns
String
isCharacterAllowed()method 
public function isCharacterAllowed(charCode:int):Boolean

Accepts a character code and determines if it is allowed or not.

Parameters

charCode:int

Returns
Boolean