Hi Guys,

I've just been testing an upgrade from HTML::FormFu 50001 to 60001
and found an odd problem with some existing form definitions.

I've attached a test file that passes on the old version and fails on the new. Any ideas?

Cheers!

Kal

--
Kahlil (Kal) Hodgson                       GPG: C37B01F4
Head of Technology                         (m) +61 (0) 4 2573 0382
DealMax Pty Ltd                            (w) +61 (0) 3 9008 5281

Suite 1005
401 Docklands Drive
Docklands VIC 3008 Australia

"All parts should go together without forcing.  You must remember that
the parts you are reassembling were disassembled by you.  Therefore,
if you can't get them together again, there must be a reason.  By all
means, do not use a hammer."  -- IBM maintenance manual, 1925

use strict;
use warnings;

use Test::More tests => 1;
use HTML::FormFu;

my $form = HTML::FormFu->new();
    
$form->populate(
    {

        elements => [
        {
            name  => 'individual',
            type  => 'Radio',
            label => 'Yes',
            value => 1,
        },
        {
            name  => 'individual',
            type  => 'Radio',
            label => 'No',
            value => 0,
        },
        ],
        constraints => [ 'SingleValue' ],
    }
);

$form->process(
    { 
        individual  => [ '1', '0' ],
    }
);
ok (!$form->valid('individual') => 'pair of values not valid for individual');

<<attachment: kahlil_hodgson.vcf>>

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to