Re: [dfv] missing_optional_valid ?
Status: Inactive
Brought to you by:
markjugg
|
From: Mark S. <ma...@su...> - 2010-12-09 16:49:38
|
On 12/09/2010 10:30 AM, Louis-David Mitterrand wrote:
> On Thu, Dec 09, 2010 at 10:24:03AM -0500, Mark Stosberg wrote:
>> On 12/09/2010 04:53 AM, Louis-David Mitterrand wrote:
>>> Hi,
>>>
>>> When using the $profile below, the 'missing_optional_valid' entries are
>>> never included in the valid hash. Specifically the notify_* checkboxes
>>> in require_some are never returned when unchecked. Did I miss something?
>>
>> What happens if you add all of the "require_some" fields explicitly to
>> an "optional" definition?
>
> Then it works, but only if I also add:
>
> defaults_regexp_map => {
> qr/^notify_/ => 0,
> },
>
> Shouldn't the 'require_some' values that are not actually required (as
> per submit) be auto-added to 'optional'?
Not necessarily. There are two cases for one could intend "require_some"
to be used:
- At least one of five fields is required. We do not care about fields
which are not submitted. Either they are required are they are not in
the profile.
- At least one of five fields is required. We would still like the
non-required fields to be returned as valid.
I think it's reasonable to add require_some entires to optional if you
want them all through as "valid".
Mark
|