This is a simple validator to ensure that each of the fields you have
marked with the is_required property as yes are indeed present
before the associated action is executed.
for instance, given the configuration:
An action executed with such a context:
my $wf = FACTORY->get_workflow( $id );
$wf->context( username => foo );
$wf->context( office => Ottumwa );
$wf->execute_action( CreateUser );
Would fail with a message:
The following fields require a value: email
You normally do not need to configure this validator yourself. It gets
generated automatically when the Action configration is read
in. However, if you do need to create it yourself:
Note that we do not try to match the value in the context against a
set of known values or algorithm, just see if the value is defined
using the Perl notion for defined rather than true/false, which means
0 and the empty string will both be valid.
Validates whether a given set of required fields are defined.
Takes two parameters: a workflow object and an array of names of fields.
The provided fields are matched against the workflow in question and
Workflow::Exceptions are thrown in case of missing fields.