<mx:TextInput id="txtValue" restrict="[0-9]*\.?[0-9]{0,5}" />
but this is not working.Can anyone help me out on this?Its very urgent.
Thanks
-Amruta Kulkarni
--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To post to this group, send email to flex_...@googlegroups.com.
To unsubscribe from this group, send email to flex_india+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.
You can use Number Validator
Look following code
Regards
Kiran Reddy
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
</fx:Script>
<fx:Declarations>
<mx:NumberValidator id="numV" source="{sampleText}" property="text"
trigger="{myButton}" triggerEvent="click" domain="real" precision="5"
precisionError="Decimal Should Not be morethan 5"/>
</fx:Declarations>
<s:layout>
<s:VerticalLayout/>
</s:layout>
<mx:TextInput id="sampleText"/>
<mx:Button id="myButton" label="Validate"/>
</s:Application>
Hi
You need
to use max chars property as 5 and 0-9 in restrict property then i think solves your problem
--
You received this message because you are subscribed to the Google Groups "Flex India Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex_india+...@googlegroups.com.
To post to this group, send email to flex_...@googlegroups.com.
Visit this group at http://groups.google.com/group/flex_india.
For more options, visit https://groups.google.com/d/optout.