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
  • Loading branch information
monotasker committed Jul 6, 2024
1 parent 2206b7d commit aeae270
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 @@ -361,7 +361,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 aeae270

Please sign in to comment.