Changeset 1231 for trunk/lib/OpenGuides/Utils.pm
- Timestamp:
- 10/18/08 19:19:22 (3 months ago)
- Files:
-
- 1 modified
-
trunk/lib/OpenGuides/Utils.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/OpenGuides/Utils.pm
r1163 r1231 11 11 use URI::Escape; 12 12 use MIME::Lite; 13 use Data::Validate::URI qw( is_web_uri ); 13 14 14 15 =head1 NAME … … 377 378 378 379 # Now do our real validation 379 # Numeric tests380 380 foreach my $var (qw(os_x os_y)) { 381 381 if ($q->param($var) and $q->param($var) !~ /^-?\d+$/) { … … 387 387 if ($q->param($var) and $q->param($var) !~ /^-?\d+\.?(\d+)?$/) { 388 388 push @fails, "$var must be numeric, was: " . $q->param($var); 389 } 390 } 391 392 if ( $q->param('website') and $q->param('website') ne 'http://' ) { 393 unless ( is_web_uri( $q->param('website') ) ) { 394 push @fails, $q->param('website') . ' is not a valid web URI'; 389 395 } 390 396 }
