projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5bbd1e
)
Webshop speichern: Zumindestens etwas mehr Eingabevalidierung, vor DB-Fehlern
author
Jan Büren
<jan@kivitendo.de>
Wed, 17 Nov 2021 12:09:54 +0000
(13:09 +0100)
committer
Jan Büren
<jan@kivitendo.de>
Fri, 11 Feb 2022 14:19:56 +0000
(15:19 +0100)
SL/DB/Shop.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Shop.pm
b/SL/DB/Shop.pm
index
63f988f
..
e75f17c
100644
(file)
--- a/
SL/DB/Shop.pm
+++ b/
SL/DB/Shop.pm
@@
-16,10
+16,13
@@
sub validate {
my ($self) = @_;
my @errors;
my ($self) = @_;
my @errors;
-
+ # critical checks
push @errors, $::locale->text('The description is missing.') unless $self->{description};
push @errors, $::locale->text('The description is missing.') unless $self->{description};
- push @errors, $::locale->text('The path is missing.') unless $self->{path};
-
+ push @errors, $::locale->text('The path is missing.') unless $self->{path};
+ push @errors, $::locale->text('The Host Name is missing') unless $self->{server};
+ push @errors, $::locale->text('The Host Name seems invalid') unless $self->{server} =~ m/[0-9A-Za-z].\.[0-9A-Za-z]/;
+ push @errors, $::locale->text('Orders to fetch neeeds a positive Integer')
+ unless $self->{orders_to_fetch} > 0;
return @errors;
}
return @errors;
}