forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
Description
Describe the bug
In DSpace, when a metadata field has both a element and and/or elements, the submit form validation does not consider the defined scopes.
Currently, the backend enforces required validation even if the field is hidden or readonly in the current scope.
To Reproduce
Steps to reproduce the behavior:
-
Configure a metadata field with and / in certain scopes.
-
Submit an item in a scope where the field should be hidden or readonly.
-
Observe that the backend still enforces required validation.
Expected behavior
Required validation should be ignored if the current scope matches or . The backend must check the scope before enforcing required fields.
Related work
PR: Scope-aware required field validation
- Updated MetadataValidator to check scope before validating required fields.
- Added logic to skip validation for hidden/readonly fields in the current scope.
- Fixed/extended test cases for scope-aware validation.
- Added test form definitions with proper scope declarations.