X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/baac72df4777f1d63da63867e893c302b5c0bf5a..5723fbf943e494ce9ffd6f9fc44251eb04d3362c:/SL/DB/RequirementSpecPredefinedText.pm diff --git a/SL/DB/RequirementSpecPredefinedText.pm b/SL/DB/RequirementSpecPredefinedText.pm index a63a903c8..33738ead8 100644 --- a/SL/DB/RequirementSpecPredefinedText.pm +++ b/SL/DB/RequirementSpecPredefinedText.pm @@ -7,12 +7,15 @@ use SL::DB::Manager::RequirementSpecPredefinedText; use SL::DB::Helper::ActsAsList; use SL::Locale::String; +__PACKAGE__->meta->initialize; + sub validate { my ($self) = @_; my @errors; - push @errors, t8('The title is missing.') if !$self->title; - push @errors, t8('The description is missing.') if !$self->description; + push @errors, t8('The description is missing.') if !$self->description; + push @errors, t8('The description is not unique.') if $self->get_first_conflicting('description'); + push @errors, t8('The title is missing.') if !$self->title; return @errors; }