X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/baac72df4777f1d63da63867e893c302b5c0bf5a..46f9d91b44c432aa017f44b6b2f53114e190428e:/SL/DB/RequirementSpecPredefinedText.pm diff --git a/SL/DB/RequirementSpecPredefinedText.pm b/SL/DB/RequirementSpecPredefinedText.pm index a63a903c8..c2ab0c87c 100644 --- a/SL/DB/RequirementSpecPredefinedText.pm +++ b/SL/DB/RequirementSpecPredefinedText.pm @@ -5,14 +5,20 @@ use strict; use SL::DB::MetaSetup::RequirementSpecPredefinedText; use SL::DB::Manager::RequirementSpecPredefinedText; use SL::DB::Helper::ActsAsList; +use SL::DB::Helper::AttrHTML; use SL::Locale::String; +__PACKAGE__->meta->initialize; + +__PACKAGE__->attr_html('text'); + 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; }