marei: new koma-names + fallback for outdated versions
[kivitendo-erp.git] / SL / DB / RequirementSpecPredefinedText.pm
1 package SL::DB::RequirementSpecPredefinedText;
2
3 use strict;
4
5 use SL::DB::MetaSetup::RequirementSpecPredefinedText;
6 use SL::DB::Manager::RequirementSpecPredefinedText;
7 use SL::DB::Helper::ActsAsList;
8 use SL::DB::Helper::AttrHTML;
9 use SL::Locale::String;
10
11 __PACKAGE__->meta->initialize;
12
13 __PACKAGE__->attr_html('text');
14
15 sub validate {
16   my ($self) = @_;
17
18   my @errors;
19   push @errors, t8('The description is missing.')    if !$self->description;
20   push @errors, t8('The description is not unique.') if  $self->get_first_conflicting('description');
21   push @errors, t8('The title is missing.')          if !$self->title;
22
23   return @errors;
24 }
25
26 1;