| line | % | coverage | condition |
| 1004 | 100 | | $params->{'schema'} || $params->{'members'} |
| 1005 | 100 | | $params->{'args'} || $params->{'input'} |
| 1031 | 100 | | $params->{'description'} || 'validate_strict' |
| 1034 | 25 | | $schema->{'members'} and $schema->{'description'} || $schema->{'error_msg'} |
| 1044 | 100 | | ref $args ne "HASH" and ref $args ne "ARRAY" |
| 100 | | exists $params->{'args'} and not defined $args |
| 1047 | 33 | | $error_msg || "${schema_description}: args must be a hash or array reference" |
| 1126 | 100 | | $rules->{'transform'} and defined $value |
| 1145 | 100 | | ref $args eq "HASH" and not exists $args->{$key} |
| 100 | | ref $rules eq "HASH" and $is_optional |
| 1190 | 100 | | ref $rules eq "HASH" and ref $rules->{'type'} eq "ARRAY" |
| 1202 | 100 | | defined(my $min = $rules->{'min'} // $rules->{'minimum'}) and defined(my $max = $rules->{'max'}) |
| 100 | | $rules->{'min'} // $rules->{'minimum'} |
| 1209 | 100 | | $rules->{'memberof'} or $rules->{'enum'} or $rules->{'values'} |
| 1210 | 67 | | $rules->{'min'} // $rules->{'minimum'} |
| 1221 | 100 | | A | B | C | D | E | F | dec |
|---|
| 0 | X | X | X | X | X | 0 | | 1 | 0 | X | X | X | X | 0 | | 1 | 1 | 0 | X | X | X | 0 | | 1 | 1 | 1 | 0 | X | X | 0 | | 1 | 1 | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 1 | 1 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| ref $rule_value eq "CODE" and $rule_name ne "validate" and $rule_name ne "callback" and $rule_name ne "validator" and $rule_name ne "transform" and $rule_name ne "optional" |
| 1231 | 67 | | &Scalar::Util::blessed($rule_value) and $rule_value->can("as_string") |
| 1235 | 100 | | $rule_name eq "matches" or $rule_name eq "regex" |
| 100 | | $rule_name eq "memberof" or $rule_name eq "enum" or $rule_name eq "values" |
| 100 | | $rule_name eq "validate" or $rule_name eq "validator" |
| 100 | | $rule_name eq "min" or $rule_name eq "minimum" |
| 1238 | 100 | | $type eq "number" or $type eq "float" |
| 100 | | $type eq "number" or $type eq "float" or $type eq "num" or $type eq "double" |
| 100 | | $type eq "boolean" or $type eq "bool" |
| 100 | | $type eq "string" or $type eq "str" |
| 100 | | $type eq "integer" or $type eq "int" |
| 1240 | 33 | | $rules->{'error_msg'} || "${rule_description}: Parameter '${key}' must be a string" |
| 1242 | 25 | | ref $value eq "" or defined $value and length $value |
| 1243 | 0 | | $rules->{'error_msg'} || "${rule_description}: Parameter '${key}' must be a string" |
| 1346 | 67 | | exists $custom_types->{$type}{'min'} or exists $custom_types->{$type}{'minimum'} |
| 1347 | 33 | | $custom_types->{$type}{'min'} // $custom_types->{$type}{'minumum'} |
| 1350 | 100 | | $type eq "string" or $type eq "str" |
| 100 | | $type eq "integer" or $type eq "number" or $type eq "float" |
| 1363 | 33 | | $rules->{'error_msg'} || "${rule_description}: String parameter '${key}' too short, ($len characters), must be at least $rule_value characters" |
| 1367 | 0 | | $rules->{'error_msg'} || "${rule_description}: '${key}' can't be decoded" |
| 1435 | 67 | | $type eq "string" or $type eq "str" |
| 100 | | $type eq "integer" or $type eq "number" or $type eq "float" |
| 1441 | 67 | | $rules->{'error_msg'} || "${rule_description}: String parameter '${key}' too long, ($len characters), must be no longer than $rule_value" |
| 1445 | 0 | | $rules->{'error_msg'} || "${rule_description}: '${key}' can't be decoded" |
| 1510 | 67 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1540 | 67 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1563 | 75 | | $rules->{'type'} eq "integer" or $rules->{'type'} eq "number" or $rules->{'type'} eq "float" |
| 1569 | 100 | | !defined($rules->{'case_sensitive'}) || $rules->{'case_sensitive'} == 1 |
| 1595 | 75 | | $rules->{'type'} eq "integer" or $rules->{'type'} eq "number" or $rules->{'type'} eq "float" |
| 1601 | 67 | | !defined($rules->{'case_sensitive'}) || $rules->{'case_sensitive'} == 1 |
| 1658 | 67 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1661 | 100 | | $custom_type and $custom_type->{'type'} |
| 1665 | 100 | | $custom_type and $custom_type->{'transform'} |
| 1674 | 67 | | $type eq "number" or $rule_value eq "float" |
| 67 | | $type eq "string" or $type eq "Str" |
| 1684 | 67 | | ref $member or $member =~ /\D/ |
| 1693 | 67 | | ref $member or not $member =~ /^[-+]?(\d*\.\d+|\d+\.?\d*)$/ |
| 1726 | 33 | | $value < 0 or $value > 2147483647 |
| 1734 | 67 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1743 | 67 | | ref $rule_value eq 'HASH' && !exists $rule_value->{'type'} |
| 1784 | 0 | | "${rule_description}: Parameter '${key}': 'validate' only supports coderef, not " . ref($rule_value) // $rule_value |
| 1862 | 67 | | not ref $validator or ref $validator ne "CODE" |
| 1955 | 75 | | ref $rules eq "HASH" and exists $rules->{'default'} and not exists $result{$key} |
| 1960 | 75 | | ref $rules eq "HASH" and $rules->{'schema'} and ref $result{$key} eq "HASH" |
| 2003 | 67 | | $rel->{'description'} || 'Cannot specify both ' . join(' and ', @present) |
| 2018 | 67 | | $rel->{'description'} || 'Must specify at least one of: ' . join(', ', @params) |
| 2030 | 67 | | exists $args->{$if_param} and defined $args->{$if_param} |
| 2034 | 67 | | exists $args->{$then_param} and defined $args->{$then_param} |
| 2035 | 33 | | $rel->{'description'} || "When $if_param is specified, $then_param is required" |
| 2049 | 67 | | exists $args->{$param} and defined $args->{$param} |
| 2050 | 67 | | exists $args->{$requires} and defined $args->{$requires} |
| 2051 | 67 | | $rel->{'description'} || "$param requires $requires to be specified" |
| 2067 | 75 | | exists $args->{$if_param} and defined $args->{$if_param} and $args->{$if_param} |
| 2069 | 33 | | exists $args->{$then_param} and defined $args->{$then_param} |
| 2088 | 67 | | $rel->{'description'} || "When $if_param is specified, $then_param must be $operator $value (got $actual)" |
| 2104 | 67 | | exists $args->{$if_param} and defined $args->{$if_param} |
| 2107 | 67 | | exists $args->{$then_param} and defined $args->{$then_param} |
| 2109 | 67 | | $rel->{'description'} || "When $if_param equals '${equals}', $then_param is required" |