FormValidator/Validator/Required.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 93.7% 30 / 32 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« FormValidator/Input.pm ↑ Summary FormValidator/Role/Profile.pm »
1 package Dancer2::Plugin::FormValidator::Validator::Required;
2  
3 17 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 17 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 17 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 17 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 17 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 17 with 'Dancer2::Plugin::FormValidator::Role::Validator';
11  
12 sub message {
13 return {
14 3 ▶ en => '%s is required',
Subroutine message: called CC=1 SCAR=0.0
Pod undocumented
15 ru => '%s обязательно для заполнения',
16 de => '%s ist erforderlich',
17 };
18 }
19  
20 around 'stop_on_fail' => sub {
21 9 ▶ return 1;
Subroutine __ANON__: called CC=1 SCAR=0.0
22 17 };
23  
24 sub validate {
25 41 ▶ my ($self, $field, $input) = @_;
Subroutine validate: called CC=1 SCAR=0.0
Pod undocumented
26  
27 41 return $self->_field_defined_and_non_empty($field, $input);
28 }
29  
30 17 1;
« FormValidator/Input.pm ↑ Summary FormValidator/Role/Profile.pm »