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: 21483
Status: rejected
Priority: 0/
Queue: Data-FormValidator

People
Owner: MARKSTOS [...] cpan.org
Requestors: sven-bitcard [...] sven.de
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 4.40
Fixed in: (no value)



Subject: subs used with contraint_methods may not return true/false
When the sub I use to test the constraint returns "1" that's the value that ends up in the next constraint and also in valid() in the Results object. The documentation says I have to return true or false, but I have to return the (untainted) value or undef it seems. perl 5.8.4 DFV 4.40 Linux 2.6.15.4 (Debian sarge)
Subject: Re: [rt.cpan.org #21483] subs used with contraint_methods may not return true/false
Date: Thu, 14 Sep 2006 10:10:13 -0400
To: bug-Data-FormValidator [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Sven Neuhaus via RT wrote: Show quoted text
> > When the sub I use to test the constraint returns "1" that's the value > that ends up in the next constraint and also in valid() in the Results > object. > The documentation says I have to return true or false, but I have to > return the (untainted) value or undef it seems.
Sven, I don't believe this a bug, although perhaps there is some documentation that could clearer. If you want to see resolution on this, please submit a failing Test::More style test case which illustrates the issue, and a specific reference to the documentation that says true or false is correct. I believe the behavior is actually that true or false is correct when untainting is off for the field, and returning the value is correct when untainting is on for the field. Mark
I'm marking this as "rejected", because I don't believe it's a bug. As I said below, feel free to respond with more details to re-open the ticket, or discuss the issue on the DFV users list that's documented. Mark On Thu Sep 14 10:11:57 2006, mark@summersault.com wrote: Show quoted text
> Sven Neuhaus via RT wrote: >
> > > > When the sub I use to test the constraint returns "1" that's the value > > that ends up in the next constraint and also in valid() in the Results > > object. > > The documentation says I have to return true or false, but I have to > > return the (untainted) value or undef it seems.
> > Sven, > > I don't believe this a bug, although perhaps there is some documentation > that could clearer. If you want to see resolution on this, please > submit a failing Test::More style test case which illustrates the issue, > and a specific reference to the documentation that says true or false is > correct. > > I believe the behavior is actually that true or false is correct when > untainting is off for the field, and returning the value is correct when > untainting is on for the field. > > Mark >