The StringValidator class validates that a string length is within a specified range. The following example ensures that a string is between 6 and 12 characters long:
Code Samples:
<?xml version=”1.0″?>
<!– validators\StringExample.mxml –>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”>
<mx:Form id=”membershipForm”>
<mx:FormItem id=”fullNameItem” label=”Full Name”>
<!– Not validated –>
<mx:TextInput id=”fullNameInput”/>
</mx:FormItem>
<mx:FormItem id=”userNameItem” label=”Username”>
<mx:TextInput id=”userNameInput”/>
</mx:FormItem>
</mx:Form>
<mx:StringValidator source=”{userNameInput}” property=”text”
minLength=”6″ maxLength=”12″/>
</mx:Application>







