Skip to content
This repository has been archived by the owner on Jan 5, 2018. It is now read-only.

Fix constraint validation, match regex against url-string not value #10

Open
wants to merge 1 commit into
base: 8.x-1.x
Choose a base branch
from

Conversation

pixelmord
Copy link

No description provided.

@@ -20,13 +20,14 @@ class VideoProviderMatchConstraintValidator extends ConstraintValidator {
*/
public function validate($value, Constraint $constraint) {
$regexes = $constraint->getRegularExpressionsOption();
if (empty($value)) {
$url = $value->getUrl()->toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link fields are not the only field types that are supported in media_entity_embeddable_video. This code assumes it is.

@slashrsm
Copy link
Member

This should have been resolved with 2199a19.

Feel free to re-open if not.

Thank you for your contribution.

@axe312ger
Copy link
Contributor

It is fixed in our project with the most current dev version. Feel free to close it @slashrsm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants