Validators in Flex 2 are faceless objects which means you can store them in an array and then go through that array and call validate on each one. In 1.5 we have a validateStructure method, but that's been deprecated to give everyone more control over the validator infrastructure.
So store your validators in an array, and then in the submit button go through and call validate() on each. If all of the return values have a results property with length of 0 you're good to go, if any have a non-zero length it was invalid. Matt -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Raymond Camden Sent: Saturday, December 17, 2005 6:36 AM To: [email protected] Subject: [flexcoders] flex2 and simple form question So I've got a form. Each field has a validator. These work fine if you click in the field and then leave it w/o entering data. I've marked the form items required, and a nice little * shows up. In general, everything works, but you can still hit the submit button and none of the validators run. It seems like there should be a simple way to say, on submit - check each field and run the validator, but I can' t seem to find an example on that. -- ======================================================================= Raymond Camden, Director of Development for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email : [EMAIL PROTECTED] Blog : ray.camdenfamily.com Yahoo IM : cfjedimaster "My ally is the Force, and a powerful ally it is." - Yoda -- 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 ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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/

