| line |
true |
false |
branch |
|
28
|
353 |
0 |
if ($self->{'field_definitions'}) |
|
46
|
0 |
71 |
ref $self eq __PACKAGE__ ? : |
|
63
|
16 |
55 |
if (not $config->{'include_standard_fields'} or $config->{'include_standard_fields'} =~ /^all$/iu) { } |
|
67
|
55 |
0 |
if (ref $config->{'include_standard_fields'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (not ref $config->{'include_standard_fields'}) { } |
|
75
|
130 |
0 |
if ($standard_fields{$fld}) { } |
|
86
|
322 |
0 |
if $Concierge::Users::Meta::field_definitions{$fld} |
|
92
|
7 |
64 |
if ($config->{'field_overrides'}) |
|
100
|
7 |
0 |
ref $config->{'field_overrides'} eq 'ARRAY' ? : |
|
103
|
0 |
8 |
unless ref $override eq "HASH" |
|
106
|
0 |
8 |
unless ($field_name) |
|
113
|
3 |
5 |
if ($field_name =~ /user_id|created_date|last_mod_date/u) |
|
119
|
0 |
5 |
unless ($merged_definitions{$field_name}) |
|
128
|
5 |
9 |
if $attr eq "field_name" |
|
132
|
0 |
9 |
if ($attr =~ /field_name|category/u) |
|
138
|
1 |
8 |
if ($attr eq "validate_as") |
|
141
|
1 |
0 |
unless ($Concierge::Users::Meta::type_validator_map{$validator_type}) |
|
153
|
1 |
4 |
if (exists $override->{'type'} and not exists $override->{'validate_as'}) |
|
156
|
1 |
0 |
if ($Concierge::Users::Meta::type_validator_map{$new_type}) |
|
162
|
1 |
0 |
if (exists $override->{'required'} and $override->{'required'} == 1 and not exists $override->{'must_validate'}) |
|
167
|
1 |
4 |
if (%warnings) |
|
176
|
12 |
59 |
if ($config->{'app_fields'}) |
|
180
|
12 |
0 |
if (ref $config->{'app_fields'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (not ref $config->{'app_fields'}) { } |
|
189
|
10 |
8 |
if (ref $field_def eq 'HASH') { } |
|
|
8 |
0 |
elsif (not ref $field_def) { } |
|
191
|
0 |
10 |
if ($reserved_fields{$field_name}) |
|
206
|
10 |
0 |
unless (exists $field_definition->{'null_value'}) |
|
212
|
2 |
6 |
if ($reserved_fields{$field_name}) |
|
240
|
178 |
0 |
if ($def->{'type'} eq "enum" and $def->{'options'}) |
|
247
|
178 |
0 |
if (not $def->{'default'} or $def->{'default'} eq "") |
|
250
|
145 |
335 |
if ($opt =~ /^\*(.+)\s*$/u) |
|
300
|
0 |
161 |
unless $field_def |
|
303
|
160 |
1 |
if ($field_def->{'validate_as'}) |
|
306
|
160 |
0 |
if $Concierge::Users::Meta::type_validator_map{$validator_type} |
|
312
|
1 |
0 |
if $type and $Concierge::Users::Meta::type_validator_map{$type} |
|
323
|
0 |
2 |
unless $field_def |
|
345
|
0 |
15 |
unless $field_name |
|
415
|
640 |
1295 |
if grep {$_ eq $f;} @$cat |
|
423
|
57 |
183 |
unless $fields and @$fields |
|
428
|
0 |
645 |
unless $def |
|
436
|
133 |
512 |
if ($def->{'validate_as'} and $def->{'validate_as'} ne $def->{'type'}) |
|
443
|
148 |
497 |
if ($def->{'options'} and @{$def->{'options'};}) |
|
451
|
640 |
5 |
if ($def->{'description'}) |
|
456
|
641 |
4 |
if $def->{'max_length'} |
|
457
|
254 |
391 |
if $def->{'must_validate'} |
|
472
|
4 |
1286 |
unless defined $value |
|
475
|
884 |
402 |
if $value eq "" |
|
478
|
1 |
401 |
if $value =~ /^\-?\d+$/u |
|
481
|
0 |
401 |
if $value =~ /^[01]$/u |
|
484
|
135 |
266 |
if $value =~ /^\S+$/u |
|
508
|
0 |
0 |
unless (ref $self and $self->{'backend'}) |
|
519
|
0 |
0 |
unless my $storage_dir = $self->{'backend'}{'storage_dir'} |
|
526
|
0 |
0 |
unless (-f $yaml_file) |
|
539
|
0 |
0 |
unless open my $fh, "<", $yaml_file |
|
544
|
0 |
0 |
if ($@) |
|
579
|
5 |
2 |
if (grep {$_ eq $value;} @$options) |
|
596
|
2 |
1 |
if ($field_def->{'max_length'} and length $value > $field_def->{'max_length'}) |
|
613
|
108 |
2 |
if ($value =~ /^[a-zA-Z0-9._%+-]+\@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/u) |
|
627
|
0 |
0 |
if ($value =~ /^\d{4}-\d{2}-\d{2}$/u) |
|
644
|
0 |
0 |
if ($value =~ /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}$/u) |
|
661
|
0 |
0 |
if (defined $value and $value =~ /^[01]$/u) |
|
678
|
21 |
2 |
if ($value =~ /^\+?[\d\s\-\(\)]+$/u and length $value >= 7) |
|
693
|
0 |
0 |
if ($value =~ /^\-?\d+$/u) |
|
705
|
1 |
1 |
unless $value and $value =~ /^[a-zA-Z0-9]{2,24}$/u |
|
717
|
1 |
15 |
unless $value and $value =~ /^[a-zA-Z00C0-024F'\342\200\231\-.]+(?:\s+[a-zA-Z00C0-024F'\342\200\231\-.]+)*$/u |
|
994
|
0 |
137 |
if $ENV{'USERS_SKIP_VALIDATION'} |
|
1003
|
13 |
166 |
unless (defined $field_def) |
|
1010
|
5 |
161 |
if (not defined $value or $value eq $field_def->{'null_value'}) |
|
1012
|
0 |
5 |
if $field_def->{'required'} |
|
1019
|
0 |
161 |
unless ($validator) |
|
1028
|
10 |
151 |
if ($result->{'message'}) |
|
1033
|
151 |
10 |
if ($result->{'success'}) { } |
|
|
4 |
6 |
elsif ($field_def->{'must_validate'}) { } |
|
1044
|
11 |
122 |
if @warnings |
|
1061
|
5 |
0 |
if ($condition =~ /^(\w+)(=|:|!|>|<)(.+)$/u) { } |
|
1065
|
0 |
5 |
unless (grep {$_ eq $field;} @{$$self{"fields"};}) |
|
1081
|
5 |
0 |
if (@parsed_and) |
|
1087
|
0 |
5 |
unless @parsed_filters |