From a5f00f3a4f8a59fb31d83a3b5d4a8d14abda9a3c Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Wed, 28 Apr 2010 17:47:26 +0200 Subject: [PATCH] fix validation tests --- lib/ZOOM/IRSpy/Utils.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy/Utils.pm b/lib/ZOOM/IRSpy/Utils.pm index 856e602..4fd7677 100644 --- a/lib/ZOOM/IRSpy/Utils.pm +++ b/lib/ZOOM/IRSpy/Utils.pm @@ -848,7 +848,7 @@ sub validate_record { my @errors = $id; if ($tests{'protocol'}) { - push(@errors, 'protocol number is not valid') if $protocol !~ /^(z39\.50|sru|srw|tcp)$/; + push(@errors, 'protocol number is not valid') if $protocol !~ /^(z39\.50|sru|srw|tcp)$/i; } if ($tests{'port'}) { @@ -861,7 +861,7 @@ sub validate_record { if ($tests{'database'}) { push(@errors, 'database name is not valid') if $dbname =~ m,/,i; - push(@errors, 'database has trailing spaces') if $dbname ne trimField($dbname); + push(@errors, 'database has trailing spaces') if $dbname =~ /^\s+|\s+$/; } if ($tests{'hosturl'}) { -- 1.7.10.4