getEmbedCode($value); if (!isset($value)) { return; } foreach (Twitter::$validationRegexp as $pattern => $key) { if (preg_match($pattern, $value)) { return; } } $this->context->addViolation($constraint->message); } }