Subject: | Multiple Constraints in docs - incorrect? |
The section of the documentation on multiple constraints for a single field
(https://metacpan.org/module/Data::FormValidator#MULTIPLE-CONSTRAINTS)
gives the following as an example:
my_zipcode_field => [
'zip',
{
constraint => '/^406/',
name => 'starts_with_406',
}
],
However, that results in a fatal error at line 969
(die "Value for constraint_method within hashref '$val->{constraint_method}' not a code
reference or Regexp . Do you need func(), not 'func'?";)
The following appears to work:
my_zipcode_field => [
'zip',
{
constraint_method => '/^406/',
name => 'starts_with_406',
}
],
thanks