From 4b76077ebb7ee6afaab07a71cfe9b0568121528a Mon Sep 17 00:00:00 2001 From: Ian Scott Date: Sat, 6 Jul 2024 14:49:34 -0400 Subject: [PATCH] Removed minimum 3-character requirement in MetadataSchema for titles and simply required that the string not be empty (cherry picked from commit aeae2700b65802d383687acc94b0f3e848bb6cc4) --- invenio_rdm_records/services/schemas/metadata.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/invenio_rdm_records/services/schemas/metadata.py b/invenio_rdm_records/services/schemas/metadata.py index 17c17a813..0b81157be 100644 --- a/invenio_rdm_records/services/schemas/metadata.py +++ b/invenio_rdm_records/services/schemas/metadata.py @@ -362,7 +362,10 @@ class MetadataSchema(Schema): required=True, validate=validate.Length(min=1, error=_("Missing data for required field.")), ) - title = SanitizedUnicode(required=True, validate=validate.Length(min=3)) + title = SanitizedUnicode( + required=True, + validate=validate._not_blank(_("Title cannot be a blank string.")) + ) additional_titles = fields.List(fields.Nested(TitleSchema)) publisher = SanitizedUnicode() publication_date = EDTFDateString(required=True)