Revision b154cbc6
Von Jan Büren vor fast 3 Jahren hinzugefügt
SL/DB/Shop.pm | ||
---|---|---|
16 | 16 |
my ($self) = @_; |
17 | 17 |
|
18 | 18 |
my @errors; |
19 |
|
|
19 |
# critical checks |
|
20 | 20 |
push @errors, $::locale->text('The description is missing.') unless $self->{description}; |
21 |
push @errors, $::locale->text('The path is missing.') unless $self->{path}; |
|
22 |
|
|
21 |
push @errors, $::locale->text('The path is missing.') unless $self->{path}; |
|
22 |
push @errors, $::locale->text('The Host Name is missing') unless $self->{server}; |
|
23 |
push @errors, $::locale->text('The Host Name seems invalid') unless $self->{server} =~ m/[0-9A-Za-z].\.[0-9A-Za-z]/; |
|
24 |
push @errors, $::locale->text('Orders to fetch neeeds a positive Integer') |
|
25 |
unless $self->{orders_to_fetch} > 0; |
|
23 | 26 |
return @errors; |
24 | 27 |
} |
25 | 28 |
|
Auch abrufbar als: Unified diff
Webshop speichern: Zumindestens etwas mehr Eingabevalidierung, vor DB-Fehlern