Problem/Motivation
Validation defined in the FlickrEmbedCode Constraint fails to run with the default config in config/install.
Proposed resolution
Fix validation.
Remaining tasks
Code, review, commit
User interface changes
NA
API changes
NA
Data model changes
NA
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3046832-2.patch | 3.5 KB | fenstrat |
Comments
Comment #2
fenstratAttached patch should fix validation.
Added a Functional test to cover this. It'd be better as a Kernel or even Unit to better test the validator, however as Functional this easily test the config in config/install.
Not uploading a test only patch as there no other tests in the module, so I don't think the tests will actually run anyway (without the fixes it fails locally).
Comment #3
sam152 commentedI can't see a way that the other code paths in the validator are actually triggered:
if (is_string($value)) {...
elseif ($value instanceof FieldItemInterface) {It's attached in
getSourceFieldConstraintson the media type plugin, which is then only assigned to the FieldItemList class:Perhaps worth removing the other two types of data? Otherwise, patch looks great.