| 16 | | cmp_deeply( $rule->constraints , $block->result_constraints ) ; |
| | 16 | |
| | 17 | is( $rule->constraints->{strict}{oppai}[0]{label} , $block->strict_oppai0 ); |
| | 18 | is( $rule->constraints->{strict}{oppai}[1]{label} , $block->strict_oppai1 ); |
| | 19 | is( $rule->constraints->{strict}{email}[0]{label} , $block->strict_email ); |
| | 20 | is( $rule->constraints->{strict}{email_mx}[0]{label} , $block->strict_email_mx ); |
| | 21 | is( $rule->constraints->{loose}{email}[0]{label} , $block->loose_email ); |
| | 22 | is( $rule->constraints->{loose}{email_mx}[0]{label} , $block->loose_email_mx ); |
| | 23 | |
| | 24 | is ( ref $rule->constraints->{strict}{oppai}[0]{method} , 'CODE' ); |
| | 25 | is ( ref $rule->constraints->{strict}{oppai}[1]{method} , 'CODE' ); |
| | 26 | is ( ref $rule->constraints->{strict}{email}[0]{method} , 'CODE' ); |
| | 27 | is ( ref $rule->constraints->{strict}{email_mx}[0]{method} , 'CODE' ); |
| | 28 | is ( ref $rule->constraints->{loose}{email}[0]{method} , 'CODE' ); |
| | 29 | is ( ref $rule->constraints->{loose}{email_mx}[0]{method} , 'CODE' ); |
| | 30 | |
| | 31 | is( $rule->args->{strict}{email_mx}{'Email::email'}{'-mxcheck'} , 1 ); |
| | 32 | is( $rule->args->{loose}{email_mx}{'Email::email_loose'}{'-mxcheck'} , 1 ); |
| 42 | | --- result_constraints eval |
| 43 | | { |
| 44 | | 'strict' => { |
| 45 | | 'email' => { |
| 46 | | 'FormValidator::LazyWay::Rule::Email::email' => { |
| 47 | | 'label' => 'Email::email', |
| 48 | | 'method' => sub {"DUMMY"} |
| 49 | | } |
| 50 | | }, |
| 51 | | 'oppai' => { |
| 52 | | 'MyRule::Oppai::name' => { |
| 53 | | 'label' => '+MyRule::Oppai::name', |
| 54 | | 'method' => sub {"DUMMY"} |
| 55 | | } |
| 56 | | }, |
| 57 | | 'email_mx' => { |
| 58 | | 'FormValidator::LazyWay::Rule::Email::email' => { |
| 59 | | 'label' => 'Email::email', |
| 60 | | 'method' => sub {"DUMMY"} |
| 61 | | } |
| 62 | | } |
| 63 | | }, |
| 64 | | 'loose' => { |
| 65 | | 'email' => { |
| 66 | | 'FormValidator::LazyWay::Rule::Email::email_loose' => { |
| 67 | | 'label' => 'Email::email_loose', |
| 68 | | 'method' => sub {"DUMMY"} |
| 69 | | } |
| 70 | | }, |
| 71 | | 'email_mx' => { |
| 72 | | 'FormValidator::LazyWay::Rule::Email::email_loose' => { |
| 73 | | 'label' => 'Email::email_loose', |
| 74 | | 'method' => sub {"DUMMY"} |
| 75 | | } |
| 76 | | } |
| 77 | | } |
| 78 | | } |
| | 59 | --- strict_email chomp |
| | 60 | Email::email |
| | 61 | --- strict_oppai0 chomp |
| | 62 | Email::email |
| | 63 | --- strict_oppai1 chomp |
| | 64 | +MyRule::Oppai::name |
| | 65 | --- strict_email_mx chomp |
| | 66 | Email::email |
| | 67 | --- loose_email chomp |
| | 68 | Email::email_loose |
| | 69 | --- loose_email_mx chomp |
| | 70 | Email::email_loose |
| 101 | | --- result_constraints eval |
| 102 | | { |
| 103 | | 'strict' => { |
| 104 | | 'email' => { |
| 105 | | 'FormValidator::LazyWay::Rule::Email::email' => { |
| 106 | | 'label' => 'Email::email', |
| 107 | | 'method' => sub {"DUMMY"} |
| 108 | | } |
| 109 | | }, |
| 110 | | 'oppai' => { |
| 111 | | 'MyRule::Oppai::name' => { |
| 112 | | 'label' => '+MyRule::Oppai::name', |
| 113 | | 'method' => sub {"DUMMY"} |
| 114 | | } |
| 115 | | }, |
| 116 | | 'email_mx' => { |
| 117 | | 'FormValidator::LazyWay::Rule::Email::email' => { |
| 118 | | 'label' => 'Email::email', |
| 119 | | 'method' => sub {"DUMMY"} |
| 120 | | } |
| 121 | | } |
| 122 | | }, |
| 123 | | 'loose' => { |
| 124 | | 'email' => { |
| 125 | | 'FormValidator::LazyWay::Rule::Email::email_loose' => { |
| 126 | | 'label' => 'Email::email_loose', |
| 127 | | 'method' => sub {"DUMMY"} |
| 128 | | } |
| 129 | | }, |
| 130 | | 'email_mx' => { |
| 131 | | 'FormValidator::LazyWay::Rule::Email::email_loose' => { |
| 132 | | 'label' => 'Email::email_loose', |
| 133 | | 'method' => sub {"DUMMY"} |
| 134 | | } |
| 135 | | } |
| 136 | | } |
| 137 | | } |
| | 94 | --- strict_email chomp |
| | 95 | Email::email |
| | 96 | --- strict_oppai0 chomp |
| | 97 | Email::email |
| | 98 | --- strict_oppai1 chomp |
| | 99 | +MyRule::Oppai::name |
| | 100 | --- strict_email_mx chomp |
| | 101 | Email::email |
| | 102 | --- loose_email chomp |
| | 103 | Email::email_loose |
| | 104 | --- loose_email_mx chomp |
| | 105 | Email::email_loose |