Good evening,

I do this code and i retreived true or false from validate method but i
would like to retreive default validators behaviors (TextInput with red
border and error tooltip attach to the error field)

<?xml version="1.0"?> 
<mx:Application
        xmlns:mx="http://www.macromedia.com/2003/mxml";
        creationComplete="initApp()"
        >

<mx:Script>
<![CDATA[
        import mx.validators.* ;
        
        private var model : Object ;
        private var myCurrencyValidator : CurrencyValidator ;
        
        
        private function initApp () : Void {
                model = new Object () ;
                
                myCurrencyValidator = new CurrencyValidator() ;
                myCurrencyValidator.decimalSeparator = "," ;
                myCurrencyValidator.thousandsSeparator="." ;
myCurrencyValidator.separationError = "separation error" ;
                myCurrencyValidator.invalidFormatCharsError = "wrong format"
;
        }
        
        
        
        private function validate () : Void {
                model.SalaryPerMonth = SalaryPerMonth.text ;
                if(CurrencyValidator.validateCurrency(myCurrencyValidator ,
model.SalaryPerMonth ,null , "SalaryPerMonth")){
                        // TODO - set TextInput with red border and error
tooltips
                }
        }

        ]]>
</mx:Script>
        <mx:Form id="myForm" >
                <mx:FormItem label="Zip Code" >
                        <mx:TextInput id="zipCode"/>
                </mx:FormItem>
                <mx:FormItem label="Salary per month" >
                        <mx:TextInput id="SalaryPerMonth"/>
                </mx:FormItem>
                <mx:FormItem>
                        <mx:Button label="Submit" click="validate()" />
                </mx:FormItem>
        </mx:Form>

</mx:Application>

Thanks for you help

Eric

-----Message d'origine-----
De : [email protected] [mailto:[EMAIL PROTECTED] De la
part de Eric Guesdon
Envoyé : lundi 18 juillet 2005 20:32
À : [email protected]
Objet : [FlexCoders] Validator width actionscript and without model tag


Hi to all,

I’m looking for validator without <mx :Model> or <mx :Validator>. In fact
how to make validation totally with actionscript

I didn’t find any solutions for the moment

First is it possible ?
Second are there any old messages about this use of validation

Thanks in advance for your help

Eric



This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the person
to whom it is addressed. If you are not the intended recipient,  you are not
authorized to read, print, retain, copy, disseminate,  distribute, or use
this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links







This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to