Using the NumberValidator class
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Form> <mx:FormItem label="Number of Mac (max 10 per customer)"> <mx:TextInput id="quantityInput" /> </mx:FormItem> <mx:FormItem> <mx:Button label="Submit" /> </mx:FormItem> </mx:Form> <mx:NumberValidator id="numV" source="{quantityInput}" property="text" minValue="1" maxValue="10" domain="int" /> </mx:Application>