Suzy,

 

            The listener, source and trigger are all optional properties of Validators. You can just call the validate() function. Pass in the string you want to validate and it will return the ValidationResult. The validate() function is on the base class, Validator.

 

Jason

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Suzy Lawson
Sent: Tuesday, June 27, 2006 10:54 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Custom Validator woes....

 

I'm building an e-mail client where the "To:" field can have a comma
delimited array of e-mail addresses: "[EMAIL PROTECTED], [EMAIL PROTECTED]com"

I have the validation occuring in the focusOut event, where I split
the "To:" field so I get an Array of e-mail addresses.
var emails : Array = value.split(",");

I then want to loop through and validate each value. However, there is
no easy way to do this using the Flex SDK EmailValidator.as.

Ideally, I would think I could call a static method which would return
me a ValidationResultEvent, which I could then add to my component.
However, everything with the SDK EmailValidator class requires a
listener/source/trigger to be bound to it and no matter what I try to
do....it looks at that "To:" field as one big String...I can't give it
just the iterated split value.

Any ideas on this?? Is there a way to statically call a method without
having to pass in a reference to the EmailValidator object?

__._,_.___

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





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to