X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f16c552035ab973a9aed4a1dc29d0e16be7ff541..c6dd542b51ae9549ad42a54f9023b905412bbab9:/SL/DB/Customer.pm?ds=sidebyside diff --git a/SL/DB/Customer.pm b/SL/DB/Customer.pm index e3e30ddff..048db7c10 100644 --- a/SL/DB/Customer.pm +++ b/SL/DB/Customer.pm @@ -41,6 +41,15 @@ sub _before_save_set_customernumber { return 1; } +sub validate { + my ($self) = @_; + + my @errors; + push @errors, $::locale->text('The customer name is missing.') if !$self->name; + + return @errors; +} + sub short_address { my ($self) = @_;