[Catalyst] Catalyst::Plugin::FormValidator questions

Drew Taylor taylor.andrew.j at gmail.com
Wed Nov 16 01:35:15 CET 2005


On 11/15/05, John Wang <johncwang at gmail.com> wrote:
>
> A little more progress. Outside of Catalyst, the built-in constraint
> methods can be accessed by using Data::FormValidator::Constraints:
>
> When I add this to Catalyst::Plugin::FormValidator (or a subclass) I get
> the Catalyst debug screen with the following error. This seems to happen
> when the plugin is loaded.


John,
Try adding the "use Data::FormValidator::Constraints" line in the controller
where you need the constraint, NOT in the DFV plugin. See the portion of the
docs for "constraint_methods":

> *Note:* To use the built-in constraints, they need to first be loaded into
> your name space using the syntax above. (Unless you are using the old
> constraints key, documented in "BACKWARDS COMPATIBILITY"<http://search.cpan.org/%7Emarkstos/Data-FormValidator-4.02/lib/Data/FormValidator.pm#BACKWARDS_COMPATIBILITY>
> ).
>

Drew
--
----------------------------------------------------------------
Drew Taylor * Web development & consulting
Email: drew at drewtaylor.com * Site implementation & hosting
Web : www.drewtaylor.com <http://www.drewtaylor.com> *
perl/mod_perl/DBI/mysql/postgres
----------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051115/71014a8d/attachment.htm


More information about the Catalyst mailing list