Subject: | Required fields cannot have value "0" |
Date: | Sat, 18 Oct 2008 13:27:19 +0200 |
To: | bug-CGI-FormBuilder [...] rt.cpan.org |
From: | Ansgar Burchardt <ansgar [...] 2008.43-1.org> |
Hi,
Required fields cannot take the value "0". This is annoying for fields
that require a number which might be 0.
The problem can be reproduced like this:
my $form = CGI::FormBuilder->new;
$form->field(name => 'foo', required => 1, value => "0");
$form->validate;
print $form->render;
It says the 'foo' field has an invalid value, setting it to "1" makes
FormBuilder accept the form.
It would be nice if this could be fixed in the next release.
Regards,
Ansgar Burchardt
--
PGP: 1024D/595FAD19 739E 2D09 0969 BEA9 9797 B055 DDB0 2FF7 595F AD19