You are here

class FacebookEmbedCodeConstraint in Media entity facebook 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Validation/Constraint/FacebookEmbedCodeConstraint.php \Drupal\media_entity_facebook\Plugin\Validation\Constraint\FacebookEmbedCodeConstraint
  2. 3.x src/Plugin/Validation/Constraint/FacebookEmbedCodeConstraint.php \Drupal\media_entity_facebook\Plugin\Validation\Constraint\FacebookEmbedCodeConstraint

Check if a value is a valid Facebook embed code or post URL.

Plugin annotation


@constraint(
  id = "FacebookEmbedCode",
  label = @Translation("Facebook embed code", context = "Validation"),
  type = { "link", "string", "string_long" }
)

Hierarchy

  • class \Drupal\media_entity_facebook\Plugin\Validation\Constraint\FacebookEmbedCodeConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of FacebookEmbedCodeConstraint

File

src/Plugin/Validation/Constraint/FacebookEmbedCodeConstraint.php, line 16

Namespace

Drupal\media_entity_facebook\Plugin\Validation\Constraint
View source
class FacebookEmbedCodeConstraint extends Constraint {

  /**
   * The default violation message.
   *
   * @var string
   */
  public $message = 'Not valid Facebook post URL/embed code.';

}

Members

Namesort descending Modifiers Type Description Overrides
FacebookEmbedCodeConstraint::$message public property The default violation message.