| line | % | coverage | condition |
| 957 | 100 | | $params->{'schema'} || $params->{'members'} |
| 958 | 100 | | $params->{'args'} || $params->{'input'} |
| 978 | 100 | | $params->{'description'} || 'validate_strict' |
| 981 | 25 | | $schema->{'members'} and $schema->{'description'} || $schema->{'error_msg'} |
| 987 | 100 | | ref $args ne "HASH" and ref $args ne "ARRAY" |
| 100 | | exists $params->{'args'} and not defined $args |
| 990 | 33 | | $error_msg || "${schema_description}: args must be a hash or array reference" |
| 1069 | 100 | | $rules->{'transform'} and defined $value |
| 1088 | 100 | | ref $args eq "HASH" and not exists $args->{$key} |
| 100 | | ref $rules eq "HASH" and $is_optional |
| 1128 | 100 | | defined(my $min = $rules->{'min'} // $rules->{'minimum'}) and defined(my $max = $rules->{'max'}) |
| 100 | | $rules->{'min'} // $rules->{'minimum'} |
| 1135 | 67 | | $rules->{'min'} // $rules->{'minimum'} |
| 1146 | 80 | | A | B | C | D | dec |
|---|
| 0 | X | X | X | 0 | | 1 | 0 | X | X | 0 | | 1 | 1 | 0 | X | 0 | | 1 | 1 | 1 | 0 | 0 | | 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" |
| 1151 | 67 | | &Scalar::Util::blessed($rule_value) and $rule_value->can("as_string") |
| 1155 | 67 | | $rule_name eq "validate" or $rule_name eq "validator" |
| 100 | | $rule_name eq "min" or $rule_name eq "minimum" |
| 100 | | $rule_name eq "memberof" or $rule_name eq "enum" |
| 1158 | 100 | | $type eq "boolean" or $type eq "bool" |
| 100 | | $type eq "string" or $type eq "str" |
| 100 | | $type eq "number" or $type eq "float" |
| 1160 | 33 | | $rules->{'error_msg'} || "${rule_description}: Parameter '${key}' must be a string" |
| 1162 | 25 | | ref $value eq "" or defined $value and length $value |
| 1163 | 0 | | $rules->{'error_msg'} || "${rule_description}: Parameter '${key}' must be a string" |
| 1266 | 67 | | exists $custom_types->{$type}{'min'} or exists $custom_types->{$type}{'minimum'} |
| 1267 | 33 | | $custom_types->{$type}{'min'} // $custom_types->{$type}{'minumum'} |
| 1270 | 100 | | $type eq "string" or $type eq "str" |
| 100 | | $type eq "integer" or $type eq "number" or $type eq "float" |
| 1283 | 67 | | $rules->{'error_msg'} || "${rule_description}: String parameter '${key}' too short, ($len characters), must be at least $rule_value characters" |
| 1287 | 0 | | $rules->{'error_msg'} || "${rule_description}: '${key}' can't be decoded" |
| 1355 | 67 | | $type eq "string" or $type eq "str" |
| 100 | | $type eq "integer" or $type eq "number" or $type eq "float" |
| 1361 | 33 | | $rules->{'error_msg'} || "${rule_description}: String parameter '${key}' too long, ($len characters), must be no longer than $rule_value" |
| 1365 | 0 | | $rules->{'error_msg'} || "${rule_description}: '${key}' can't be decoded" |
| 1430 | 67 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1460 | 67 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1483 | 75 | | $rules->{'type'} eq "integer" or $rules->{'type'} eq "number" or $rules->{'type'} eq "float" |
| 1489 | 100 | | !defined($rules->{'case_sensitive'}) || $rules->{'case_sensitive'} == 1 |
| 1515 | 75 | | $rules->{'type'} eq "integer" or $rules->{'type'} eq "number" or $rules->{'type'} eq "float" |
| 1521 | 33 | | !defined($rules->{'case_sensitive'}) || $rules->{'case_sensitive'} == 1 |
| 1578 | 33 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1581 | 100 | | $custom_type and $custom_type->{'type'} |
| 1585 | 100 | | $custom_type and $custom_type->{'transform'} |
| 1594 | 33 | | $type eq "number" or $rule_value eq "float" |
| 67 | | $type eq "string" or $type eq "Str" |
| 1604 | 67 | | ref $member or $member =~ /\D/ |
| 1613 | 67 | | ref $member or not $member =~ /^[-+]?(\d*\.\d+|\d+\.?\d*)$/ |
| 1644 | 33 | | $value < 0 or $value > 2147483647 |
| 1652 | 67 | | $rules->{'type'} eq "arrayref" or $rules->{'type'} eq "ArrayRef" |
| 1687 | 0 | | "${rule_description}: Parameter '${key}': 'validate' only supports coderef, not " . ref($rule_value) // $rule_value |
| 1759 | 67 | | not ref $validator or ref $validator ne "CODE" |
| 1819 | 75 | | ref $rules eq "HASH" and exists $rules->{'default'} and not exists $result{$key} |
| 1824 | 75 | | ref $rules eq "HASH" and $rules->{'schema'} and ref $result{$key} eq "HASH" |
| 1867 | 33 | | $rel->{'description'} || 'Cannot specify both ' . join(' and ', @present) |
| 1882 | 33 | | $rel->{'description'} || 'Must specify at least one of: ' . join(', ', @params) |
| 1894 | 33 | | exists $args->{$if_param} and defined $args->{$if_param} |
| 1898 | 33 | | exists $args->{$then_param} and defined $args->{$then_param} |
| 1899 | 0 | | $rel->{'description'} || "When $if_param is specified, $then_param is required" |
| 1913 | 33 | | exists $args->{$param} and defined $args->{$param} |
| 1914 | 33 | | exists $args->{$requires} and defined $args->{$requires} |
| 1915 | 33 | | $rel->{'description'} || "$param requires $requires to be specified" |
| 1931 | 25 | | exists $args->{$if_param} and defined $args->{$if_param} and $args->{$if_param} |
| 1933 | 33 | | exists $args->{$then_param} and defined $args->{$then_param} |
| 1952 | 33 | | $rel->{'description'} || "When $if_param is specified, $then_param must be $operator $value (got $actual)" |
| 1968 | 33 | | exists $args->{$if_param} and defined $args->{$if_param} |
| 1971 | 33 | | exists $args->{$then_param} and defined $args->{$then_param} |
| 1973 | 33 | | $rel->{'description'} || "When $if_param equals '${equals}', $then_param is required" |