diff --git a/src/NodaValidationHelper.php b/src/NodaValidationHelper.php index 9a88ba5..9205719 100644 --- a/src/NodaValidationHelper.php +++ b/src/NodaValidationHelper.php @@ -27,6 +27,13 @@ final class NodaValidationHelper { */ public static function validateActorDescription(string $description, array $names = []):void { + // For nodac, empty actor descriptions are to be allowed. Thus, a + // dedicated check for fully empty ones with a dedicated exception + // is needed. + if (empty($description)) { + throw new MDInvalidEmptyInputException("No author name is provided"); + } + // Throw error on descriptions that are too short if (\mb_strlen($description) < 10) { throw new MDgenericInvalidInputsException("Author description is too short");