]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/RequirementSpecPredefinedText.pm
Pflichtenheftitems: Reihenfolge bei Anzeigen Unterfunktionsblockmaske für Focus gefixt
[mfinanz.git] / SL / DB / RequirementSpecPredefinedText.pm
index a63a903c8e25e087a34f9e013198d26c0ebbcd4a..33738ead82fb009434cddc68b4b9dd0d05a0690c 100644 (file)
@@ -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;
 }