[Fwd: [Html-widget] formfu validation proposals]
Mario Minati
mario.minati at googlemail.com
Tue Mar 13 13:36:14 GMT 2007
Am Dienstag 13 März 2007 10:24 schrieb Carl Franks:
> On 12/03/07, Mario Minati <mario.minati at googlemail.com> wrote:
> > Am Montag 12 März 2007 12:41 schrieben Sie:
> > > Von: Carl Franks <fireartist at gmail.com>
> > > I propose making it a lot more powerful and flexible, with the
> > > following steps:
> > > * filter
> > > * constrain
> > > * inflate
> > > * validate
> > > * transform
> >
> > May be can give a modul and / or function name or catalyst ation to call
> > in the yaml. This way we could seperate the form showing function and the
> > validation function and we could use the transform functions to store the
> > data in the model.
> > And keep the code seperated from the form with very little effort of
> > connecting both pieces. Just a quick thought.
>
> As with elements, filters, etc. The new validators and transformers
> will accept fully qualified package names starting with '+'.
>
> elements:
> - name: foo
> validate:
> - +MyApp::Validate::TestFoo
>
> The package just needs to implement a process() method, and die if the
> validation fails.
> And if you're using Catalyst-Controller-HTML-FormFu, you'll have
> access to the context via $self->form->stash->{context}
Ok, that will be fine for my needs.
Greets,
Mario
More information about the Html-widget
mailing list