Whether or not the validation is done in the view or presentation model, note that the framework classes like NumberValidator can be instantiated and invoked in ActionScript.
On Tue, Apr 14, 2009 at 9:49 AM, claudiu ursica <the_bran...@yahoo.com>wrote: > > > Now the validation is triggered by the view but you can forward the actual > validation to the presentationModel instance who actually does the > validation ... so the view only display the info that comes from the model > and that's it... > > C > ------------------------------ > *From:* Borek <bore...@yahoo.co.uk> > *To:* flexcoders@yahoogroups.com > *Sent:* Tuesday, April 14, 2009 7:25:47 PM > *Subject:* [flexcoders] Re: Validation in Model (rather than in View) > > How does the Presentation Model pattern help? > > --- In flexcod...@yahoogro ups.com <flexcoders%40yahoogroups.com>, claudiu > ursica <the_braniak@ ...> wrote: > > > > Have a look a the presentaion model pattern maybe helps your cause... > > > > C > > > > > > > > > > ____________ _________ _________ __ > > From: Borek <bore...@... > > > To: flexcod...@yahoogro ups.com <flexcoders%40yahoogroups.com> > > Sent: Tuesday, April 14, 2009 6:16:56 PM > > Subject: [flexcoders] Validation in Model (rather than in View) > > > > > > > > > > > > Flex supports validation in the View layer quite well but the problem is > that the validation rules should not be there at all. They belong to Model > but I'm not sure how to implement that in Flex. > > > > I would like to be able to do something like this: > > > > [Required] > > [String(minLength= "5")] > > public var name : String; > > > > and then just have the TextInput in the View validated automatically. > Silverlight + .NET RIA Services can work like that but is that possible in > Flex where we don't have 2-way data binding? > > > > Thanks, > > Borek > > > > > >