Fix EZP-23322: validate if required object relation list is empty

JIRA: https://jira.ez.no/browse/EZP-23322

This fixes a regression introduced in EZP-23028, causing a required objectrelationlist attribute to be accepted.