2010/6/25 Octavian Rasnita <orasn...@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 _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu