« blib/lib/FormValidator/Lite/Constraint/Japanese.pm
↑ Summary
blib/lib/FormValidator/Lite/Messages/en.pm »
| 1 | package FormValidator::Lite::Constraint::URL; | ||
| 2 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use FormValidator::Lite::Constraint; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | # this regexp is taken from http://www.din.or.jp/~ohzaki/perl.htm#httpURL | ||
| 7 | # thanks to ohzaki++ | ||
| 8 | rule 'HTTP_URL' => sub { | ||
| 9 | 2 | ▶ | $_ =~ /^s?https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+$/ |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 10 | 1 | }; | |
| 11 | |||
| 12 | 1 | 1; | |
| 13 | __END__ | ||