| line |
true |
false |
branch |
|
30
|
4 |
9 |
if defined $_[1]{'min'} and $_[0] < $_[1]{'min'} |
|
31
|
3 |
6 |
if defined $_[1]{'max'} and $_[0] > $_[1]{'max'} |
|
61
|
81 |
11 |
unless $f->{'multi'} |
|
66
|
52 |
45 |
if not $errfield or $errfield eq 'default' |
|
70
|
11 |
81 |
$f->{'multi'} ? : |
|
73
|
2 |
90 |
if $f->{'mincount'} and @values < $f->{'mincount'} |
|
74
|
2 |
90 |
if $f->{'maxcount'} and @values > $f->{'maxcount'} |
|
77
|
49 |
43 |
if @err |
|
84
|
517 |
379 |
unless $rules->{'template'} |
|
86
|
17 |
362 |
if (exists $tpl->{$field}) { } |
|
100
|
86 |
11 |
unless exists $r->{'required'} |
|
101
|
88 |
9 |
unless exists $r->{'rmwhitespace'} |
|
104
|
75 |
7 |
if ($v and $r->{'rmwhitespace'}) |
|
112
|
9 |
88 |
if (not defined $v or length $v < 1) |
|
113
|
6 |
3 |
if $r->{'required'} |
|
114
|
2 |
1 |
if exists $r->{'default'} |
|
126
|
0 |
155 |
if $r->{'template'} and not $$t{$r->{'template'}} |
|
129
|
2 |
153 |
if $r->{'minlength'} and length $v < $r->{'minlength'} |
|
130
|
3 |
150 |
if $r->{'maxlength'} and length $v > $r->{'maxlength'} |
|
132
|
1 |
149 |
if $r->{'enum'} and not grep(($_ eq $v), @{$$r{'enum'};}) |
|
134
|
1 |
52 |
ref $r->{'regex'} eq 'ARRAY' ? : |
|
|
23 |
30 |
if $r->{'regex'} and ref $r->{'regex'} eq 'ARRAY' ? !($v =~ /$r->{'regex'}[0]/i) : !($v =~ /$r->{'regex'}/) |
|
136
|
67 |
59 |
if ($r->{'template'}) |
|
138
|
11 |
23 |
exists $r->{$_} ? : |
|
|
18 |
49 |
$in ? : |
|
139
|
30 |
37 |
if _validate($_[0], $t, \%r) |
|
142
|
1 |
18 |
ref $r->{'func'} eq 'ARRAY' ? : |
|
|
10 |
9 |
if $r->{'func'} and ref $r->{'func'} eq 'ARRAY' ? !$r->{'func'}[0]->($_[0], $r) : !$r->{'func'}->($_[0], $r) |
|
171
|
0 |
0 |
unless $hs{'To'} |
|
172
|
0 |
0 |
unless $hs{'Subject'} |
|
184
|
0 |
0 |
if ($self->{'_TUWF'}{'mail_sendmail'} eq 'log') { } |
|
|
0 |
0 |
elsif (open my $mailer, '|-:utf8', "$self->{'_TUWF'}{'mail_sendmail'} -t -f '$hs{'From'}'") { } |
|
188
|
0 |
0 |
if not close $mailer |
|
202
|
0 |
0 |
ref $_[0] eq 'TUWF::Validate' ? : |
|
210
|
0 |
0 |
if $what eq 'json' |
|
215
|
0 |
0 |
@v > 1 ? : |
|
|
0 |
0 |
if $what eq 'param' |
|
222
|
0 |
0 |
$what eq 'param' ? : |
|
|
0 |
0 |
$what eq 'post' ? : |
|
|
0 |
0 |
$what eq 'get' ? : |
|
225
|
0 |
0 |
if @_ == 1 |
|
228
|
0 |
0 |
if @_ == 2 |