hai varun

     Your code works for stingvalidator because there is a property called
minLength and maxLength.
     But i need the code for numericValidator which should allow minimum of
3 digits and maimum of 5 digits.
     Could you please forward for this requirement.

Bye

On Thu, Feb 12, 2009 at 7:30 PM, vrathore <[email protected]> wrote:

>
> Hello,
>
> Here is the code sniplet
>
> public function Save():void
> {
>
>                        var vResult:ValidationResultEvent;
>
>                        vResult = textValidator.validate();
>                        if(vResult.type != ValidationResultEvent.VALID)
>                        {
>                                setValidationFocus(textBox);
>                                return;
>                        }
> }
>
> private function setValidationFocus(formObject:Object):void
> {
>        Alert.show("Please correct the error(s) in the highlighted box.");
>        formObject.setFocus();
>        formObject.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
> }
>
>        <mx:TextInput id="textBox" />
>        <mx:StringValidator id="textValidator" source="{textBox}"
> minLength="5" maxLength="3" required="true"  />
>
>
> Cheers
>
> Varun Rathore
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to