blib/lib/FormValidator/Lite/Constraint/Japanese.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | n/a | ||
total | 16 | 16 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package FormValidator::Lite::Constraint::Japanese; | ||||||
2 | 1 | 1 | 436 | use strict; | |||
1 | 1 | ||||||
1 | 30 | ||||||
3 | 1 | 1 | 3 | use warnings; | |||
1 | 2 | ||||||
1 | 18 | ||||||
4 | 1 | 1 | 4 | use FormValidator::Lite::Constraint; | |||
1 | 1 | ||||||
1 | 6 | ||||||
5 | |||||||
6 | 1 | 1 | 4 | rule 'HIRAGANA' => sub { delsp($_) =~ /^\p{InHiragana}+$/ }; | |||
1 | 1 | ||||||
1 | 11 | ||||||
7 | rule 'KATAKANA' => sub { delsp($_) =~ /^\p{InKatakana}+$/ }; | ||||||
8 | rule 'JTEL' => sub { $_ =~ /^0\d+\-?\d+\-?\d+$/ }; | ||||||
9 | rule 'JZIP' => sub { $_ =~ /^\d{3}\-\d{4}$/ }; | ||||||
10 | |||||||
11 | 1; | ||||||
12 | __END__ |