Skip to content

Commit

Permalink
global: Clarifies error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriz-uniba authored and lnielsen committed Aug 1, 2022
1 parent f5ebf3c commit afcc770
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion invenio_vocabularies/contrib/names/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def validate_names(self, data, **kwargs):
can_compose = data.get("family_name") and data.get("given_name")
name = data.get("name")
if not can_compose and not name:
messages = [_("name or family_name and given_name must be present.")]
messages = [
_(
"A name or the family name together with the given name must be present."
)
]
raise ValidationError({"family_name": messages})

@post_load
Expand Down

0 comments on commit afcc770

Please sign in to comment.