Subject: | $result->valid("multi-select") is not returning an array ref |
I've been using the D::FV modules in the HTMLObject::Form module I'm working on (http://htmlobject.sf.net/) and have noticed an issue that has occured recently after updating to the latest version(s) of D::FV that Debian testing provides.
The issue is I'm selecting multiple entries in a multi-select select box and after fixing up the input hash to be an array ref, when I call the $results->valid("color2") it is not returning an array ref of all the selected items, but instead returns the first selected item only.
I'm currently using version 3.54 of D::FV, perl 5.8.3, Debian testing.
The HTMLObject::Form code is not currently released yet, but you can get it from the unstable debian repository at http://www.pcxperience.org/index.html#debian-apt. Version 2.18-11 is the latest release candidate. I have a form.cgi script in the examples directory which is testing this, though the HTMLObject::Form::validate() method will need to be re-modified to take the valid values from the result object.
To work around this issue, I'm having to use the value from my input hash instead of the $result->valid("color2"); value.
I haven't been able to tell from the documentation, but is it possible for the input value to be modified by the check() method and thus have a different value be returned when calling valid()? If not, then my workaround is ok, but if you can get a different value, then this is a major issue. :)