I've forwarded this thread off to people who worked on validators for
2.0 so we'll see if I'm forgetting something and if not we can file some
enhancement requests.  Feel free to also file at
http://www.macromedia.com/go/wish.

Matt

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Zach Stepek
Sent: Sunday, December 18, 2005 10:12 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] flex2 and simple form question

I agree with Ray that it seems odd with everything else that Flex makes 
it easy to do that validation is as complex as it is, even though it's 
not _that_ complex.  Personally, I think that the best thing to do would

be to offer the option of doing things either way.  That way, if you 
want to do more complex validations on a field, you can write your own 
custom validation function that parses the array, but if you just want 
to do simple validation, you could set a property, maybe 
autoValidate="true", on the mx:Form or the mx:Button control that would 
do simple validation automatically.  Honestly, I think things like Drag 
and Drop and History are considerably harder to hand-code, and we have 
managers for those that make it considerably easier.

- Zach

Raymond Camden wrote:
> 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: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On
> > Behalf Of Raymond Camden
> > Sent: Saturday, December 17, 2005 6:36 AM
> > To: flexcoders@yahoogroups.com
> > 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) 
> <http://www.macromedia.com/go/teammacromedia%29>
> >
> > 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) 
> <http://www.macromedia.com/go/teammacromedia%29>
>
> 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
>
>     *  Visit your group "flexcoders
>       <http://groups.yahoo.com/group/flexcoders>" on the web.
>        
>     *  To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
>
<mailto:[EMAIL PROTECTED]>
>        
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
>
------------------------------------------------------------------------
>








--
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 --------------------~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/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