[Catalyst] Using multiple Data::FormValidator profiles

Hartmaier Alexander Alexander.Hartmaier at t-systems.at
Tue Nov 22 14:58:35 CET 2005


Wow thats cool!
At the moment i use Hash::Merge with the option 
'Hash::Merge::set_behavior('STORAGE_PRECEDENT');' to join two profiles (they 
are normal hashes) to get this behaviour, but support for more than one 
profile is welcome!

-Alex


-----Original Message-----
From: catalyst-bounces at lists.rawmode.org 
[mailto:catalyst-bounces at lists.rawmode.org] On Behalf Of Will Hawes
Sent: Tuesday, November 22, 2005 2:03 PM
To: The elegant MVC web framework
Subject: [Catalyst] Using multiple Data::FormValidator profiles

I have separate CDBI classes for user and address details, each with its
own Data::FormValidator profile. I need to collect details for both
classes using a single form, which naturally needs to do error checking
and repopulation after failed submission.

This is all straightforward, but currently I use the FillInForm plugin
for these tasks and have found it can only cope with a single DFV
profile via $c->form.

More recent releases of Data::FormValidator support multiple profiles:

   Data::FormValidator->new( user_profile => ..., address_profile => ...)

I'm thinking it might be useful if the FillInForm plugin was updated to
support @$c->forms or %$c->forms rather than just $c->form. Happy to
patch it if necessary, but I'd like to know what others think.


_______________________________________________
Catalyst mailing list
Catalyst at lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5544 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051122/6c04d133/smime.bin


More information about the Catalyst mailing list