Skip to content

Commit

Permalink
Removed minimum 3-character requirement in MetadataSchema for titles …
Browse files Browse the repository at this point in the history
…and simply required that the string not be empty

(cherry picked from commit aeae270)
  • Loading branch information
monotasker committed Jan 10, 2025
1 parent 87ee1ac commit 4b76077
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion invenio_rdm_records/services/schemas/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4b76077

Please sign in to comment.