Skip Menu |

This queue is for tickets about the Data-FormValidator CPAN distribution.

Maintainer(s)' notes

This is the bug queue for Data::FormValidator.

Report information
The Basics
Id: 47502
Status: open
Priority: 0/
Queue: Data-FormValidator

People
Owner: Nobody in particular
Requestors: ifomichev [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 4.63
Fixed in: (no value)



Subject: Parameter is not recognized as unknown if it is undefined or empty string
Conditions: Data::FormValidator v4.63 Steps to reproduce: perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum => undef}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum => ""}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum => 0}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum => 1}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' Result: 0 0 1 datum 1 datum Expected result: 1 datum 1 datum 1 datum 1 datum
Subject: Re: [rt.cpan.org #47502] Parameter is not recognized as unknown if it is undefined or empty string
Date: Thu, 2 Jul 2009 07:05:27 -0400
To: bug-Data-FormValidator [...] rt.cpan.org, cascade-dataform [...] lists.sf.net
From: Mark Stosberg <mark [...] summersault.com>
Show quoted text
> Conditions: > Data::FormValidator v4.63 > > Steps to reproduce: > perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum > => undef}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' > perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum > => ""}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' > perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum > => 0}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' > perl -MData::FormValidator -le '$r = Data::FormValidator->check({datum > => 1}, {}); print join " ", 0+ $r->has_unknown, $r->unknown' > > Result: > 0 > 0 > 1 datum > 1 datum > > Expected result: > 1 datum > 1 datum > 1 datum > 1 datum
Thaks for the clear report. I am willing to have the requested change in Data::FormValidator. You, or anyone else, is welcome to submit a test case and patch to address it. Mark -- . . . . . . . . . . . . . . . . . . . . . . . . . . . Mark Stosberg Principal Developer mark@summersault.com Summersault, LLC 765-939-9301 ext 202 database driven websites . . . . . http://www.summersault.com/ . . . . . . . .