projects
/
irspy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
981eb89
)
fix validation tests
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 28 Apr 2010 15:47:26 +0000
(17:47 +0200)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 28 Apr 2010 15:47:26 +0000
(17:47 +0200)
lib/ZOOM/IRSpy/Utils.pm
patch
|
blob
|
history
diff --git
a/lib/ZOOM/IRSpy/Utils.pm
b/lib/ZOOM/IRSpy/Utils.pm
index
856e602
..
4fd7677
100644
(file)
--- 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'}) {
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'}) {
}
if ($tests{'port'}) {
@@
-861,7
+861,7
@@
sub validate_record {
if ($tests{'database'}) {
push(@errors, 'database name is not valid') if $dbname =~ m,/,i;
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'}) {
}
if ($tests{'hosturl'}) {