[html-formfu] Bug?

Carl Franks fireartist at gmail.com
Fri Jun 25 09:20:18 GMT 2010


2010/6/25 Octavian Rasnita <orasnita at gmail.com>:
> Hi,
>
> I have a form with the following element:
>
> <elements>
> name date_time
> type DateTime
> label Date:
> <constraints>
> type Required
> </constraints>
> </elements>
>
> It generates the following error:
>
> Caught exception in MyApp::Controller::Admin::Comunicate::BNG::AGI->edit
> "Not a HASH reference at e:/usr/site/lib/HTML/FormFu/Util.pm line 495.
> at e:/usr/site/lib/Catalyst/Controller/HTML/FormFu/Action/FormConfig.pm line
> 42"
>
> It works if I use it with other elements than Date and DateTime (like Text,
> Button, Checkbox, Textarea, Select...).
>
> It also works with all elements if I use only:
>
> <constraints>
> </constraints>
>
> or with:
>
> constraints Required
>
> It also works fine if I use more constraints, like:
>
> <constraints>
> type Required
> </constraints>
> <constraints>
> type Word
> </constraints>
>
> I prefer to use the syntax with <constraints>...</constraints> even when
> there is only a single constraint, because it is more consistent.
>
> A syntax like the one below is not valid and it gives errors:
>
> constraints Required
> <constraints>
> type Word
> </constraints>

Can you confirm you get the error when loading just that snippet of config?

<elements>
name date_time
type DateTime
label Date:
<constraints>
type Required
</constraints>
</elements>

I copy/pasted it, and it loads without errors.
I've also tried upgrading to the latest version of Config::General,
and that made no difference.

Carl



More information about the HTML-FormFu mailing list