Matt, I can understand the desire to give more control to users - but
considering how easy everything else is, it seems a bit odd that there
isn't a simpler way to do validation. It's like everything was done
for us (auto marking of required fields with *, nice validators out of
the box) except the final piece (auto validate on submit). I'm not
saying it makes it useless per se.... it was just surprising that
everything else was done _but_ that.


On 12/17/05, Matt Chotin <[EMAIL PROTECTED]> wrote:
> 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
>
>
>
>
>
>
>
>
>
> --
> 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
>
>
>
>
>
>
>


--
=======================================================================
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


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/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/
 


Reply via email to