Sounds good Marius - project wise though we need to address this IMHO;
as we pick up more users of lift people will want this functionality
for sure.

I guess we really need to decide at what level we want to apply
validation - Im not sure that having it tightly coupled to the
persistence tier (a la rails) is a great idea. Just had a quick look
at OVal.... i think a generic approach like that would be good as then
your just dealing with a single methodology to spec validation
criterion on any object.

Also, conceptually, a server side representation of a form seems to be
a different notion to the bind() style we have with snippets. Im not
sure how we could get it to work in a clean way - would it be an
abstraction on top of bind() ?

Anyway, great to noodle this as its certainly very important  going
forward

Cheers

Tim


On Sep 21, 7:44 am, Marius <[EMAIL PROTECTED]> wrote:
> Right ...
>
> IMHO the key things that we need to have :
>
> 1. Typesafe validation (predicates as partial functions sounds very
> good to me ;) ... )
> 2. Scala objects abstracting forms ... maybe in a way you similar with
> what presented here (also this has been mentioned in other posts)
> 3. An easy way of obtaining markup from "Form" classes
> 4. An easy way of processing the form (this is the easiest part as we
> have all we need here)
>
> I'll also do some noodling on this and let's come with concrete
> proposals.
>
> P.S.
> Some ideas are currently here:http://liftweb.net/index.php/Unified_Validation
>
> Br's,
> Marius
>
> On Sep 20, 8:46 pm, Tim Perrett <[EMAIL PROTECTED]> wrote:
>
> > Guys,
>
> > Myself and Marius have just been talking over IM about generic ways to
> > build validation into lift.
>
> > IMHO, right now it seems that there is not any cohesive way to
> > validate user input (without a bunch of manual coding). One of the
> > things we talked about is server-side form representation... I wonder
> > if there is a way to abstract form building so that it was somehow
> > generic and let you specify field content & type and also the
> > validation that needs to be applied to that control.
>
> > This just pure spitballing, but what about something like:
>
> > class MyDemoFrom extends LiftForm {
> >   def someInput = TextInput(SHtml.text(<usual stuff>), Validatons({
> >     // whatever validation here
> >   }))
>
> > }
>
> > Or whatever - I just want to try and talk through the idea rather than
> > propose code at this stage. Even when we extract the validation stuff
> > from mapper, we'll still need some way of implementing those
> > validation constraints on controls wont we?
>
> > Interesting in what people think
>
> > Cheers
>
> > Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to