[html-formfu] Bug?
Octavian Rasnita
orasnita at gmail.com
Fri Jun 25 14:44:15 GMT 2010
Thanks Carl! You're great!
Now it works fine.
Octavian
----- Original Message -----
From: "Carl Franks" <fireartist at gmail.com>
To: "HTML Form Creation,Rendering and Validation Framework" <html-formfu at lists.scsys.co.uk>
Sent: Friday, June 25, 2010 4:17 PM
Subject: Re: [html-formfu] Bug?
> On 25 June 2010 13:15, Octavian Rasnita <orasnita at gmail.com> wrote:
>> Thanks for telling me about that script. I didn't know about it.
>>
>> I have tested a config file that has a single <constraints>...</constraints>
>> and the results printed was a hashref like:
>>
>> constraints => {
>> type => 'Required',
>> },
>>
>> but if I added 2 constraints, the result was an arrayref:
>>
>> constraints => [
>> {
>> type => 'Required',
>> },
>> {
>> type => 'Word',
>> },
>> ],
>>
>> So I don't know what it should be, a hashref, or an arrayref that contains
>> more hashrefs.
>>
>> Or maybe it works with both of them, but I don't know then why it gives that
>> error when it is not a hashref.
>
> I've updated the _merge_hashes() method so it can also merge arrays
> and hashes into a new array.
> For example, this:
>
> ---
> default_args:
> elements:
> DateTime:
> constraints:
> - type: DateTime
> parser:
> strptime: '%Y-%m-%d %H:%M:00'
> elements:
> - type: DateTime
> name: foo
> constraints:
> type: Required
>
> Will now be munged into this, before being passed to populate()
>
> ---
> elements:
> - type: DateTime
> name: foo
> constraints:
> - type: DateTime
> parser:
> strptime: '%Y-%m-%d %H:%M:00'
> - type: Required
>
> This is fixed in svn -r1724
>
> Cheers,
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
More information about the HTML-FormFu
mailing list