Follow-up to #2405009-11: DER needs its own FieldItemList class.2
Problem/Motivation
We are using
ValidReferenceConstraintinDynamicEntityReferenceItemwhich usesValidReferenceConstraintValidatorandValidReferenceConstraintValidator::validateis specific to ER field.
and maybe
Do we depend on
ReferenceAccessConstraintValidatorif yes then it is also specific to ER.
Proposed resolution
Fix it by creating ValidDynamicReferenceConstraint.
Remaining tasks
Addes tests.
Complete the patch.
Review.
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 2405607-DER-constraint-validation-7.patch | 6.85 KB | jibran |
| #7 | interdiff.txt | 1.43 KB | jibran |
Comments
Comment #1
jibran@larowlan can you please have a look at it?
Comment #3
jibranComment #4
jibranThis fixes the bug.
Comment #5
jibranWhen we assign and non-reference-able entity the validation passes. So I am conflicted here. Is it the validaters duty to create a violation for this or
DynamicEntityReference::setValue()shouldn't load the$item->enitity?Comment #7
jibranWhen we assign and non-reference-able it is the validaters duty to create a violation.
Comment #8
larowlanNot needed? but can be fixed on commit.
Great work, see you on the core criticals for validation :-P
Comment #10
jibranThanks for the review. Fixed #8 on commit.
Comment #12
jibran