Subject: | missing_optional_valid field list specification |
Whilst Data::FormValidator is already great, I think it would be useful
if it would optionally accept a list of fields for the
'missing_optional_valid' setting.
A simple example of its use would be when creating or updating records
in a database. When creating a row, the ID field will often not be
supplied, but when updating a row, the ID field will be supplied:
optional => [qw(
id
middle_name
address_2
address_3
address_4
address_5
)],
missing_optional_valid => [qw(
middle_name
address_2
address_3
address_4
address_5
)],
In the above example, the id field would not be included in the valid
hash, unless it has been given a valid value.
I've attached a hastily tested patched version of
Data::FormValidator::Results. See lines 376-390.