diff --git a/lib/Exceptions/LocSubjectNameRequiredException.php b/lib/Exceptions/LocSubjectNameRequiredException.php new file mode 100644 index 00000000..ae35dd65 --- /dev/null +++ b/lib/Exceptions/LocSubjectNameRequiredException.php @@ -0,0 +1,7 @@ +Name = trim($this->Name ?? ''); + if($this->Name == ''){ + $error->Add(new Exceptions\LocSubjectNameRequiredException()); + } + if(strlen($this->Name) > EBOOKS_MAX_STRING_LENGTH){ $error->Add(new Exceptions\StringTooLongException('LoC subject: '. $this->Name)); }