[html-formfu] Bug bug bu g bug

Carl Franks fireartist at gmail.com
Fri Oct 26 11:16:57 GMT 2007


Hi Ruben,

On 26/10/2007, Ruben Fonseca <rubenfonseca at di.uminho.pt> wrote:
> Hi! I was following the Cookbook on the section "Custom error messages"
> but the hack does not work for me. I'm using all the latest CPAN
> releases. Here is the small steps to reproduce the problem. I've tried
> on both Linux and MacOS with the same problem.

> $form->get_field('test')->get_constraint('Callback')->force_errors(1);

Sorry, that's a typo - I'll fix it.

It should be:
    ->get_constraint({ type => 'Callback' })

Simply passing ('Callback') is equivalent to:
    ->get_constraint({ name => 'Callback' })
which would return nothing.

Carl



More information about the HTML-FormFu mailing list